Skip to content

Commit 7d6080f

Browse files
committed
move min_sms in is_big_gpu inside DEVICE_TYPE if else
log is not defined in torch inductor so remove Remove log.warning entirely
1 parent 33c3048 commit 7d6080f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

unsloth/models/_utils.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -543,16 +543,13 @@ def is_big_gpu(index) -> bool:
543543

544544
if DEVICE_TYPE == "xpu":
545545
prop = torch.xpu.get_device_properties(index)
546+
min_sms = 16
546547
else:
547548
prop = torch.cuda.get_device_properties(index)
549+
min_sms = 80
548550

549-
min_sms = 16 if device.type == "xpu" else 80
550551
avail_sms = prop.multi_processor_count
551552
if avail_sms < min_sms:
552-
log.warning(
553-
"Not enough SMs to use max_autotune_gemm mode",
554-
extra={"min_sms": min_sms, "avail_sms": avail_sms},
555-
)
556553
return False
557554
return True
558555

0 commit comments

Comments
 (0)