diff options
author | Nikolay Bogoychev <nheart@gmail.com> | 2020-01-23 21:23:32 +0300 |
---|---|---|
committer | Nikolay Bogoychev <nheart@gmail.com> | 2020-01-23 21:25:03 +0300 |
commit | 87a3ae9a4bde6238d31a2b87fc22754f468828ff (patch) | |
tree | ec873bd42a6260c68b0ddf104e60b44a8357fedf | |
parent | c9b9fc1505ec98877cb673abc492bc9b8e8dfdb7 (diff) |
Fix Int8Shift calls
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | intgemm.h | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -67,7 +67,7 @@ intgemm::Int8Shift::PrepareA(A.begin(), A_prepared.begin(), quant_mult, A_rows, intgemm::Int8Shift::PrepareB(B.begin(), B_prepared.begin(), quant_mult, width, B_cols); /* Prepare the bias (inplace) */ float unquant_mult_forprep = (-1)*(alpha)*(alpha)/(127.0f); -intgemm::Int8Shift::PrepareBias(1, B_prepared.begin(), 1, width, B_cols, callbacks::UnquantizeAndAddBiasAndWrite(unquant_mult_forprep, inputBias.begin(), inputBias.begin())); +intgemm::Int8Shift::PrepareBias(B_prepared.begin(), width, B_cols, callbacks::UnquantizeAndAddBiasAndWrite(unquant_mult_forprep, inputBias.begin(), inputBias.begin())); /* Multiply */ intgemm::Int8Shift::Multiply(A_prepared.begin(), B_prepared.begin(), A_rows, width, B_cols, callbacks::UnquantizeAndAddBiasAndWrite(unquant_mult_forprep, bias.begin(), C.begin())); ``` @@ -87,7 +87,7 @@ struct Unsupported_8bit { throw UnsupportedCPU(); } template<class Callback> - static void PrepareBiasFor8(const int8_t, const int8_t *, Index, Index, Index, Callback) { + static void PrepareBiasFor8(const int8_t *, Index, Index, Callback) { throw UnsupportedCPU(); } static void SelectColumnsB(const int8_t *, int8_t *, Index, const Index *, const Index *) { @@ -239,7 +239,7 @@ struct Int8Mult { // Multiply C = A * B, presuming A and B have been prepared. static void (*Multiply)(const int8_t *A, const int8_t *B, Index A_rows, Index width, Index B_cols, Callback callback); static void (*Multiply8Shift)(const uint8_t *A, const int8_t *B, Index A_rows, Index width, Index B_cols, Callback callback); - static void (*PrepareBiasFor8)(const int8_t A, const int8_t *B, Index A_rows, Index width, Index B_cols, Callback callback); + static void (*PrepareBiasFor8)(const int8_t *B, Index width, Index B_cols, Callback callback); }; template <typename Callback> @@ -249,7 +249,7 @@ template <class Callback> void (*Int8Mult<Callback>::Multiply8Shift)(const uint8_t *A, const int8_t *B, Index A_rows, Index width, Index B_cols, Callback callback) = ChooseCPU(AVX512VNNI_8bit::Multiply8Shift<Callback>, AVX512_8bit::Multiply8Shift<Callback>, AVX2_8bit::Multiply8Shift<Callback>, SSSE3_8bit::Multiply8Shift<Callback>, SSSE3_8bit::Multiply8Shift<Callback>, Unsupported_8bit::Multiply8Shift); template <class Callback> -void (*Int8Mult<Callback>::PrepareBiasFor8)(const int8_t A, const int8_t *B, Index A_rows, Index width, Index B_cols, Callback callback) = ChooseCPU(AVX512VNNI_8bit::PrepareBiasFor8<Callback>, AVX512_8bit::PrepareBiasFor8<Callback>, AVX2_8bit::PrepareBiasFor8<Callback>, SSSE3_8bit::PrepareBiasFor8<Callback>, SSSE3_8bit::PrepareBiasFor8<Callback>, Unsupported_8bit::PrepareBiasFor8); +void (*Int8Mult<Callback>::PrepareBiasFor8)(const int8_t *B, Index width, Index B_cols, Callback callback) = ChooseCPU(AVX512VNNI_8bit::PrepareBiasFor8<Callback>, AVX512_8bit::PrepareBiasFor8<Callback>, AVX2_8bit::PrepareBiasFor8<Callback>, SSSE3_8bit::PrepareBiasFor8<Callback>, SSSE3_8bit::PrepareBiasFor8<Callback>, Unsupported_8bit::PrepareBiasFor8); struct Int8 { using Integer = int8_t; |