Fix xfails for cpu pytest cases (#1527)

Adding cpu-sync and cpu-task device configs was allowing respective tests to bypass the xfail conditional for cpu pytests marked in tank/all_models.csv. This commit updates the conditional to xfail those cases for cpu-sync and cpu-task as well.
This commit is contained in:
Ean Garvey
2023-06-13 19:01:51 -05:00
committed by GitHub
parent c7b0c2961e
commit 5562d1dfda

View File

@@ -348,7 +348,11 @@ class SharkModuleTest(unittest.TestCase):
self.pytestconfig.getoption("dispatch_benchmarks_dir")
)
if config["xfail_cpu"] == "True" and device == "cpu":
if config["xfail_cpu"] == "True" and device in [
"cpu",
"cpu-sync",
"cpu-task",
]:
pytest.xfail(reason=config["xfail_reason"])
if config["xfail_cuda"] == "True" and device == "cuda":