We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a26a6b commit 94a194bCopy full SHA for 94a194b
proxy.py
@@ -138,7 +138,7 @@ def post(self, tool_name):
138
else:
139
num_gpus = subprocess.check_output(["nvidia-smi", "-L"]).decode().split("\n")
140
num_gpus = [g.strip() for g in num_gpus]
141
- num_gpus = [g for g in num_gpus if g.startswith("GPU ")]
+ num_gpus = len([g for g in num_gpus if g.startswith("GPU ")])
142
print(f"Detected {len(num_gpus)} GPUs.")
143
cuda_devices_map = dict((i, i) for i in range(num_gpus))
144
0 commit comments