Skip to content

Commit 14c96db

Browse files
[Conformance][TorchFX] Run CUDA test only with --cuda argument enabled (#3259)
### Changes TorchFX CUDA tests require --cuda argument to run ### Reason for changes to prevent conformance test to run CUDA tests by default, as by default there is no CUDA installed on CI machines
1 parent 879e80c commit 14c96db

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/post_training/test_quantize_conformance.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,11 @@ def fixture_wc_report_data(output_dir, run_benchmark_app, pytestconfig):
213213
def maybe_skip_test_case(test_model_param, run_fp32_backend, run_torch_cuda_backend, batch_size):
214214
if test_model_param["backend"] == BackendType.FP32 and not run_fp32_backend:
215215
pytest.skip("To run test for not quantized model use --fp32 argument")
216-
if test_model_param["backend"] == BackendType.CUDA_TORCH and not run_torch_cuda_backend:
217-
pytest.skip("To run test for CUDA_TORCH backend use --cuda argument")
216+
if (
217+
test_model_param["backend"] in [BackendType.CUDA_TORCH, BackendType.CUDA_FX_TORCH]
218+
and not run_torch_cuda_backend
219+
):
220+
pytest.skip(f"To run test for {test_model_param['backend'].value} backend use --cuda argument")
218221
if batch_size and batch_size > 1 and test_model_param.get("batch_size", 1) == 1:
219222
pytest.skip("The model does not support batch_size > 1. Please use --batch-size 1.")
220223
return test_model_param

0 commit comments

Comments
 (0)