From 1b4ca535ae634aafbe76ff37d4fed69a7b40ed95 Mon Sep 17 00:00:00 2001 From: DoubleMathew Date: Mon, 23 Jun 2025 20:57:55 -0500 Subject: [PATCH] move min_sms in is_big_gpu inside DEVICE_TYPE if else (#2792) log is not defined in torch inductor so remove Remove log.warning entirely --- unsloth/models/_utils.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index e40635222e..84dd72e889 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -543,16 +543,13 @@ def is_big_gpu(index) -> bool: if DEVICE_TYPE == "xpu": prop = torch.xpu.get_device_properties(index) + min_sms = 16 else: prop = torch.cuda.get_device_properties(index) + min_sms = 80 - min_sms = 16 if device.type == "xpu" else 80 avail_sms = prop.multi_processor_count if avail_sms < min_sms: - log.warning( - "Not enough SMs to use max_autotune_gemm mode", - extra={"min_sms": min_sms, "avail_sms": avail_sms}, - ) return False return True