From 3417f9d6734e19c2f69cc24ec5c12c173dbb3f54 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Sat, 4 Oct 2025 16:53:32 -0700 Subject: [PATCH 1/2] [fix] Fix logger reference in quantization.py Signed-off-by: Koushik Dutta --- tensorrt_llm/_torch/modules/fused_moe/quantization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorrt_llm/_torch/modules/fused_moe/quantization.py b/tensorrt_llm/_torch/modules/fused_moe/quantization.py index cfc54c028551..7c25758abec9 100644 --- a/tensorrt_llm/_torch/modules/fused_moe/quantization.py +++ b/tensorrt_llm/_torch/modules/fused_moe/quantization.py @@ -1614,7 +1614,7 @@ def load_all_fp4_weight_scales_and_alphas( expert_idx = local_slot_id if not torch.allclose(w1_weight_scale_2, w3_weight_scale_2): - logger.warning( + tensorrt_llm.logger.warning( f"w1_weight_scale_2 != w3_weight_scale_2 ({w1_weight_scale_2} != {w3_weight_scale_2}), selecting the larger value. Accuracy may be affected." ) w1_weight_scale_2 = torch.max(w1_weight_scale_2, From a372e2bb41ed9b47b9b7e097b96eed8dc74305d8 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Sat, 4 Oct 2025 17:07:34 -0700 Subject: [PATCH 2/2] Replace logger with trtllm_logger in quantization.py Signed-off-by: Koushik Dutta --- tensorrt_llm/_torch/modules/fused_moe/quantization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorrt_llm/_torch/modules/fused_moe/quantization.py b/tensorrt_llm/_torch/modules/fused_moe/quantization.py index 7c25758abec9..3086469ca887 100644 --- a/tensorrt_llm/_torch/modules/fused_moe/quantization.py +++ b/tensorrt_llm/_torch/modules/fused_moe/quantization.py @@ -1614,7 +1614,7 @@ def load_all_fp4_weight_scales_and_alphas( expert_idx = local_slot_id if not torch.allclose(w1_weight_scale_2, w3_weight_scale_2): - tensorrt_llm.logger.warning( + trtllm_logger.logger.warning( f"w1_weight_scale_2 != w3_weight_scale_2 ({w1_weight_scale_2} != {w3_weight_scale_2}), selecting the larger value. Accuracy may be affected." ) w1_weight_scale_2 = torch.max(w1_weight_scale_2,