We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
1 parent daaa7e7 commit df408bdCopy full SHA for df408bd
cwltool/cuda.py
@@ -19,7 +19,8 @@ def cuda_device_count() -> str:
19
except Exception as e:
20
_logger.warning("Error checking number of GPUs with nvidia-smi: %s", e)
21
return "0"
22
- return proc.stdout.decode("utf-8")
+ # NOTE: On a machine with N GPUs the query return N lines, each containing N.
23
+ return proc.stdout.decode("utf-8").split("\n")[0]
24
25
26
def cuda_version_and_device_count() -> Tuple[str, int]:
0 commit comments