Skip to content

Commit 396531e

Browse files
authored
fix for inductor no attribute prop.multi_processor_count (#2803)
1 parent 6e74172 commit 396531e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

unsloth/models/_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,10 @@ def _is_openai_available(): return False
556556
def is_big_gpu(index) -> bool:
557557

558558
if DEVICE_TYPE == "xpu":
559-
prop = torch.xpu.get_device_properties(index)
559+
prop = DeviceProperties.create(torch.device("xpu", index) if type(index) is int else index)
560560
min_sms = 16
561561
else:
562-
prop = torch.cuda.get_device_properties(index)
562+
prop = DeviceProperties.create(torch.device("cuda", index) if type(index) is int else index)
563563
min_sms = 80
564564

565565
avail_sms = prop.multi_processor_count

0 commit comments

Comments
 (0)