Skip to content

Commit

Permalink
Fixed test_tanh with respect to output scale of tanh
Browse files Browse the repository at this point in the history
Change-Id: I10a26c647a2aca8c2f809f478baf64525fe4b17c
  • Loading branch information
ashutosh-arm committed Dec 19, 2022
1 parent d80ca69 commit e74262a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/python/contrib/test_ethosn/test_tanh.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ def _get_model(shape, input_zp, input_sc, output_zp, output_sc, dtype):
@pytest.mark.parametrize("shape", [(1, 52, 52, 3)])
def test_tanh(dtype, shape):
"""Compare Tanh output with TVM."""
if ethosn_api_version() == "3.2.0":
pytest.skip("Skipping because NPU driver 22.11 fails to interpret zp used in the test.")

zp_min = np.iinfo(dtype).min
zp_max = np.iinfo(dtype).max

Expand All @@ -60,7 +57,7 @@ def test_tanh(dtype, shape):
}
outputs = []
for npu in [False, True]:
model = _get_model(shape, zp_min + 128, 1 / 256, zp_min + 128, 1 / 256, dtype)
model = _get_model(shape, zp_min + 128, 1 / 256, zp_min + 128, 1 / 128, dtype)
mod = tei.make_module(model, [])
outputs.append(
tei.build_and_run(
Expand Down

0 comments on commit e74262a

Please sign in to comment.