Skip to content
Merged
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions tests/onnx/test_onnx_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,13 @@ def _onnx_export(self, test_name, name, model_name, feature, onnx_config_class_c
model_class = FeaturesManager.get_model_class_for_feature(feature)
config = AutoConfig.from_pretrained(model_name)
model = model_class.from_config(config)

# It seems yolo-like models have problems on ONNX exporting on CUDA.
# See: https://github.com/ultralytics/yolov5/pull/8378
# (Not sure which op causing issue though)
if model.__class__.__name__.startswith("Yolos") and device != "cpu":
return

onnx_config = onnx_config_class_constructor(model.config)

if is_torch_available():
Expand Down