Skip to content

Commit

Permalink
[benchmarks] Fix CUDA device check. (pytorch#6419)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysiraichi authored and amithrm committed Mar 1, 2024
1 parent 8221cb4 commit 23e36f8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions benchmarks/benchmark_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ def _is_available(self, experiment_config):
if cfg_accelerator == "tpu":
if cfg_xla is None:
return False
elif cfg_accelerator == "cuda":
if cfg_xla is None and not is_xla_device_available("CUDA"):
return False
elif cfg_accelerator == "cpu":
elif cfg_accelerator in ("cpu", "cuda"):
pass
else:
raise NotImplementedError
Expand Down

0 comments on commit 23e36f8

Please sign in to comment.