intel / torch-xpu-ops

Apache License 2.0
19 stars 14 forks source link

Timm_efficientdet NotImplementedError: The original model code forces the use of CUDA. #492

Open mengfei25 opened 1 month ago

mengfei25 commented 1 month ago

🐛 Describe the bug

torchbench_amp_fp16_training xpu train timm_efficientdet Traceback (most recent call last): File "/home/sdp/actions-runner/_work/torch-xpu-ops/pytorch/benchmarks/dynamo/common.py", line 4177, in run ) = runner.load_model( File "/home/sdp/actions-runner/_work/torch-xpu-ops/pytorch/benchmarks/dynamo/torchbench.py", line 320, in load_model benchmark = benchmark_cls( File "/home/sdp/actions-runner/_work/torch-xpu-ops/benchmark/torchbenchmark/util/model.py", line 39, in call obj = type.call(cls, *args, **kwargs) File "/home/sdp/actions-runner/_work/torch-xpu-ops/benchmark/torchbenchmark/models/timm_efficientdet/init.py", line 55, in init raise NotImplementedError("The original model code forces the use of CUDA.") NotImplementedError: The original model code forces the use of CUDA.

model_fail_to_load

Versions

torch-xpu-ops: https://github.com/intel/torch-xpu-ops/commit/31c400195d63064940242220dc9100322d36bac4 pytorch: 0f81473d7b4a1bf09246410712df22541be7caf3 + PRs: 127277,129120 device: PVC 1100, 803.61, 0.5.1

weishi-deng commented 1 month ago

This model requests us to add xpu support for both the benchmark repo and third-party repo efficientdet-pytorch as it writes hard code with cuda like: (in https://github.com/rwightman/efficientdet-pytorch/blob/master/effdet/data/loader.py).

weishi-deng commented 1 month ago

PR https://github.com/pytorch/benchmark/pull/2374