[ci][distributed] try to fix pp test (#7054)
This commit is contained in:
@@ -928,7 +928,8 @@ def error_on_invalid_device_count_status():
|
||||
with contextlib.suppress(Exception):
|
||||
# future pytorch will fix the issue, device_count will not be cached
|
||||
# at that time, `.cache_info().currsize` will error out
|
||||
cache_entries = torch.cuda.device_count.cache_info().currsize
|
||||
cache_entries = torch.cuda.device_count.cache_info( # type: ignore
|
||||
).currsize
|
||||
if cache_entries != 0:
|
||||
# the function is already called, and the result is cached
|
||||
remembered = torch.cuda.device_count()
|
||||
|
||||
Reference in New Issue
Block a user