Skip to content

Commit b30e6ea

Browse files
authored
[Reland] Add warning about removed sm50 and sm60 arches (pytorch#158744)
1 parent 390ea60 commit b30e6ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torch/cuda/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ def _check_capability():
262262
"12.9": {"min": 70, "max": 120},
263263
}
264264

265-
if torch.version.cuda is not None: # on ROCm we don't want this check
265+
if (
266+
torch.version.cuda is not None and torch.cuda.get_arch_list()
267+
): # on ROCm we don't want this check
266268
for d in range(device_count()):
267269
capability = get_device_capability(d)
268270
major = capability[0]

0 commit comments

Comments
 (0)