Skip to content

Commit 70a3f36

Browse files
committed
move min_sms in is_big_gpu inside DEVICE_TYPE if else
log is not defined in torch inductor so remove
1 parent 33c3048 commit 70a3f36

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

unsloth/models/_utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -543,16 +543,17 @@ 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-
)
553+
#log.warning(
554+
# "Not enough SMs to use max_autotune_gemm mode",
555+
# extra={"min_sms": min_sms, "avail_sms": avail_sms},
556+
#)
556557
return False
557558
return True
558559

0 commit comments

Comments
 (0)