Skip to content

Commit 2d27c1a

Browse files
committed
fix unittest
1 parent 2e4c153 commit 2d27c1a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

_unittests/ut_torch_export_patches/test_patch_transformers.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,16 @@ def forward(
461461
target_opset=22,
462462
)
463463
# exporter_kwargs={"report":True} if exporter != "custom" else {}
464-
self.assert_onnx_disc(
465-
f"test_patched_qwen2_5_vl_vision_attention_forward-{exporter}",
466-
onnx.load(filename),
467-
instance,
468-
inputs,
469-
atol=1e-3,
470-
rtol=1,
471-
)
464+
if torch.cuda.is_available():
465+
self.assert_onnx_disc(
466+
f"test_patched_qwen2_5_vl_vision_attention_forward-{exporter}",
467+
onnx.load(filename),
468+
instance,
469+
inputs,
470+
atol=1e-3,
471+
rtol=1,
472+
providers=["CUDAExecutionProvider"],
473+
)
472474
self.clean_dump()
473475

474476
@requires_transformers("4.99")

0 commit comments

Comments
 (0)