[Core] Don't do platform detection at import time (#12933)

Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
Russell Bryant
2025-02-11 07:25:25 +00:00
committed by GitHub
parent 58047c6f04
commit c320ca8edd
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -334,10 +334,10 @@ class NvmlCudaPlatform(CudaPlatformBase):
if (len(set(device_names)) > 1
and os.environ.get("CUDA_DEVICE_ORDER") != "PCI_BUS_ID"):
logger.warning(
"Detected different devices in the system: \n%s\nPlease"
"Detected different devices in the system: %s. Please"
" make sure to set `CUDA_DEVICE_ORDER=PCI_BUS_ID` to "
"avoid unexpected behavior.",
"\n".join(device_names),
", ".join(device_names),
)