Skip to content

Arm Backend: Use tosa_ref_model only if it is avaiable #10778

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

Merged
merged 1 commit into from
May 9, 2025
Merged
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
12 changes: 11 additions & 1 deletion backends/arm/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,20 @@ def pytest_configure(config):
if getattr(config.option, "fast_fvp", False):
pytest._test_options["fast_fvp"] = config.option.fast_fvp # type: ignore[attr-defined]

pytest._test_options["tosa_version"] = "0.80" # type: ignore[attr-defined]
if config.option.arm_run_tosa_version:
pytest._test_options["tosa_version"] = config.option.arm_run_tosa_version

pytest._test_options["tosa_ref_model"] = True # type: ignore[attr-defined]
# Not all deployments of ET have the TOSA reference model available.
# Make sure we don't try to use it if it's not available.
try:
if pytest._test_options["tosa_version"] == "0.80":
import tosa_tools.v0_80.tosa_reference_model as tosa_reference_model
else:
import tosa_tools.tosa_ref_model as tosa_reference_model
except ImportError:
pytest._test_options["tosa_ref_model"] = False # type: ignore[attr-defined]
tosa_reference_model = None # noqa

logging.basicConfig(level=logging.INFO, stream=sys.stdout)

Expand Down
Loading