From 2b0b53143e6fc70a8322923cadc4d4069788e031 Mon Sep 17 00:00:00 2001 From: wl1259 Date: Wed, 10 Sep 2025 15:05:43 +0800 Subject: [PATCH] commit. brocast_to to reshape --- torch_npu/_inductor/codegen/triton.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch_npu/_inductor/codegen/triton.py b/torch_npu/_inductor/codegen/triton.py index 201136d3f6..ade1724513 100644 --- a/torch_npu/_inductor/codegen/triton.py +++ b/torch_npu/_inductor/codegen/triton.py @@ -1379,7 +1379,7 @@ class NPUIndexTritonKernel(TritonKernel): result_var.mask_vars = indexing.mask_vars # type: ignore[assignment] if append_broadcast and append_broadcast != '[]': - line = f"tl.broadcast_to({result_var}, {append_broadcast})" + line = f"tl.reshape({result_var}, {append_broadcast})" result_var = self.cse.generate(load_buffer, line, dtype=dtype) # triton can handle broadcast elif index_analyze.need_permute: -- Gitee