Skip to content

Commit

Permalink
Update target_detector.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LeiWang1999 authored Jun 30, 2024
1 parent e1fa655 commit 2e52552
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/bitblas/utils/target_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_gpu_model_from_nvidia_smi(gpu_id: int = 0):

# for multiple gpus, CUDA_DEVICE_ORDER=PCI_BUS_ID must be set to match nvidia-smi or else wrong
# gpu is returned for gpu_id
if len(gpus) > 0 and os.environ.get("CUDA_DEVICE_ORDER") != "PCI_BUS_ID":
if len(gpus) > 1 and os.environ.get("CUDA_DEVICE_ORDER") != "PCI_BUS_ID":
raise EnvironmentError("Multi-gpu environment must set `CUDA_DEVICE_ORDER=PCI_BUS_ID`.")

if gpu_id >= len(gpus) or gpu_id < 0:
Expand Down

1 comment on commit 2e52552

@LeiWang1999
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix a issue related to pr #61

Please sign in to comment.