Skip to content

Handle output from TOSA reference model being int8 #6190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 3 additions & 0 deletions backends/arm/test/runner_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,9 @@ def run_tosa_ref_model(

if self.is_quantized:
# Need to dequant back to FP32 for comparison with torch output
# Convert to int32 prior to dequantize the output
if tosa_ref_output.dtype == np.int8:
tosa_ref_output = tosa_ref_output.astype(np.int32)
quant_param = self.qp_output
assert (
quant_param is not None
Expand Down
2 changes: 1 addition & 1 deletion examples/arm/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ethos_u_base_rev="24.08"

# tosa reference model
tosa_reference_model_url="https://review.mlplatform.org/tosa/reference_model"
tosa_reference_model_rev="444eb365d92774430006e56a8c20161be2f2674f"
tosa_reference_model_rev="f9ea4ab7da19318fe36b1c34d68a3e40fd6e56c5"

########
### Mandatory user args
Expand Down
Loading