[Bugfix] Fix WSL circular import from pin_memory warning_once (#48444)
Signed-off-by: AlejandroParedesLT <alejandroparedeslatorre@gmail.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
co-authored by
Shengqi Chen
parent
0d9210a502
commit
0a684ab0c0
@@ -991,7 +991,8 @@ class Platform:
|
||||
# Pinned memory support under WSL depends on the vendor and driver
|
||||
# version. Conservative default: return False. Platform subclasses
|
||||
# that can verify support (e.g. CudaPlatformBase) override this.
|
||||
logger.warning_once(
|
||||
# warning_once() causes a circular import on WSL, see #48397.
|
||||
logger.warning(
|
||||
"Using 'pin_memory=False' as WSL is detected. "
|
||||
"This may slow down performance."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user