Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Refactor type of shift argument passed to tosa.mul
Browse files Browse the repository at this point in the history
Closes #393
  • Loading branch information
henri-gruender committed Apr 4, 2024
1 parent 922abce commit de66689
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reference-implementation/include/emitc/tosa.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ inline Src minimum(Src x, Src y) {
}

template <typename Src, IsTensorOfType<Src, int32_t> = true>
inline Src mul(Src x, Src y, const int32_t shift) {
inline Src mul(Src x, Src y, const int8_t shift) {
// Adopted from
// https://git.mlplatform.org/tosa/reference_model.git/tree/reference_model/src/ops/ewise_binary.cc?id=df8626976df6c779bb30df9c5ceef689462109c0#n436
if (shift > 0) {
Expand Down
2 changes: 1 addition & 1 deletion reference-implementation/unittests/tosa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ TEST(tosa, mul) {
Tensor2D<int32_t, 2, 2> t2{1, 2, 3, 4};

auto lambda_1d_int_shift = [&s2, &t2]() -> Tensor2D<int32_t, 2, 2> {
int32_t shift{2};
int8_t shift{2};
return tosa::mul(s2, t2, shift);
};

Expand Down

0 comments on commit de66689

Please sign in to comment.