treat zero point properly (#1686)

This commit is contained in:
Tracy Sharpe 2019-08-26 11:10:28 -07:00 committed by GitHub
parent f25847bccd
commit a8998b07b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -170,7 +170,7 @@ void
size_t CountM,
size_t CountK,
int32_t* RowSumVector,
uint16_t offb
int16_t offb
);
typedef MLAS_GEMM_U8U8_COPY_PACKA_ROUTINE* PMLAS_GEMM_U8U8_COPY_PACKA_ROUTINE;
@ -184,7 +184,7 @@ void
size_t CountN,
size_t CountK,
int32_t* ColumnSumVector,
uint16_t offa
int16_t offa
);
typedef MLAS_GEMM_U8U8_COPY_PACKB_ROUTINE* PMLAS_GEMM_U8U8_COPY_PACKB_ROUTINE;

View file

@ -36,7 +36,7 @@ MlasGemmU8U8CopyPackASse(
size_t CountM,
size_t CountK,
int32_t* RowSumVector,
uint16_t offb
int16_t offb
)
/*++
@ -165,7 +165,7 @@ MlasGemmU8U8CopyPackBSse(
size_t CountN,
size_t CountK,
int32_t* ColumnSumVector,
uint16_t offa
int16_t offa
)
/*++
@ -558,7 +558,7 @@ MlasQgemm(
CountN = N - n;
}
MlasPlatform.GemmU8U8CopyPackBRoutine(PanelB, B + n + k * ldb, ldb, CountN, CountK, ColumnSumVector, offa);
MlasPlatform.GemmU8U8CopyPackBRoutine(PanelB, B + n + k * ldb, ldb, CountN, CountK, ColumnSumVector, -int16_t(offa));
size_t CountM;
@ -570,7 +570,7 @@ MlasQgemm(
CountM = M - m;
}
MlasPlatform.GemmU8U8CopyPackARoutine(PanelA, A + k + m * lda, lda, CountM, CountK, RowSumVector, offb);
MlasPlatform.GemmU8U8CopyPackARoutine(PanelA, A + k + m * lda, lda, CountM, CountK, RowSumVector, -int16_t(offb));
int16_t* pa = PanelA;
int32_t* c = C + n + m * ldc;

View file

@ -528,7 +528,7 @@ private:
int32_t sum = 0;
for (size_t k = 0; k < K; k++) {
sum += ((*b + offb) * (*a + offa));
sum += ((int32_t(*b) - offb) * (int32_t(*a) - offa));
b += ldb;
a += 1;
}