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

Refactor type of shift argument passed to tosa.mul #417

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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