[Misc] Print stack trace using logger.exception (#9461)

This commit is contained in:
Cyrus Leung
2024-10-17 21:55:48 +08:00
committed by GitHub
parent e312e52b44
commit 390be74649
8 changed files with 26 additions and 30 deletions

View File

@@ -137,10 +137,9 @@ class CudaPlatform(Platform):
pynvml.NVML_P2P_CAPS_INDEX_NVLINK)
if p2p_status != pynvml.NVML_P2P_STATUS_OK:
return False
except pynvml.NVMLError as error:
logger.error(
except pynvml.NVMLError:
logger.exception(
"NVLink detection failed. This is normal if your"
" machine has no NVLink equipped.",
exc_info=error)
" machine has no NVLink equipped.")
return False
return True