pytorch - 💡(How to fix) Fix [triton-cpu] All HuggingFace models of the dynamo benchmark suites failed with the latest triton-cpu backend

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

cpu eval AlbertForMaskedLM
loc("/tmp/torchinductor_root/42/c4232kkgj37m2ftmtszd6tldrekdqddrcc3zq2q2ce32buia6xjs.py":60:5): error: cannot be converted to LLVM IR: missing LLVMTranslationDialectInterface registration for dialect for op: ttg.barrier E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] Triton compilation failed: triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] def triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, in_ptr3, xnumel, r0_numel, XBLOCK : tl.constexpr): E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] xnumel = 1 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] r0_numel = 512 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] R0_BLOCK: tl.constexpr = 512 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] rnumel = r0_numel E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] RBLOCK: tl.constexpr = R0_BLOCK E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] xoffset = tl.program_id(0) * XBLOCK E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] xindex = xoffset + tl.arange(0, XBLOCK)[:, None] E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] xmask = tl.full([XBLOCK], True, tl.int1)[:, None] E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] r0_index = tl.arange(0, R0_BLOCK)[None, :] E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] r0_offset = 0 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] r0_mask = tl.full([R0_BLOCK], True, tl.int1)[None, :] E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] roffset = r0_offset E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] rindex = r0_index E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] r0_0 = r0_index E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp0 = tl.load(in_ptr0 + (r0_0), None) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp12 = tl.load(in_ptr2 + (r0_0), None) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp14 = tl.load(in_ptr3 + (r0_0), None) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp1 = tl.full([1, 1], -100, tl.int64) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp2 = tmp0 != tmp1 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp3 = tl.full([1, 1], 0, tl.int64) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp4 = tl.where(tmp2, tmp0, tmp3) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp5 = tl.full([1, 1], 30000, tl.int32) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp6 = tmp4 + tmp5 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp7 = tmp4 < 0 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp8 = tl.where(tmp7, tmp6, tmp4) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tl.device_assert((0 <= tmp8) & (tmp8 < 30000), "index out of bounds: 0 <= tmp8 < 30000") E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp10 = tl.load(in_ptr1 + (tmp8 + 30000*r0_0), None, eviction_policy='evict_last').to(tl.float32) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp11 = tmp10.to(tl.float32) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp13 = tmp11 - tmp12 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp15 = tl_math.log(tmp14) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp16 = tmp13 - tmp15 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp17 = -tmp16 E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp18 = tl.full([1, 1], 0.0, tl.float32) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp19 = tl.where(tmp2, tmp17, tmp18) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp20 = tl.broadcast_to(tmp19, [XBLOCK, R0_BLOCK]) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp22 = tl.sum(tmp20, 1)[:, None].to(tl.float32) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp23 = tmp2.to(tl.int64) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp24 = tl.broadcast_to(tmp23, [XBLOCK, R0_BLOCK]) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp26 = tl.sum(tmp24, 1)[:, None].to(tl.int64) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp27 = tmp26.to(tl.float32) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tmp28 = (tmp22 / tmp27) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tl.debug_barrier() E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] tl.store(in_out_ptr0 + (tl.full([1, 1], 0, tl.int32).broadcast_to(XBLOCK, 1)), tmp28, None) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] metadata: {'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*i64', 'in_ptr1': '*bf16', 'in_ptr2': '*fp32', 'in_ptr3': '*fp32', 'xnumel': 'constexpr', 'r0_numel': 'i32', 'XBLOCK': 'constexpr'}, 'device': None, 'constants': {'xnumel': 1, 'XBLOCK': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]], (4,): [['tt.divisibility', 16]], (6,): [['tt.divisibility', 16]]}], 'device_type': 'cpu', 'num_warps': 4, 'num_stages': 1, 'debug': True, 'cc': ''} E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] Traceback (most recent call last): E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 932, in _precompile_config E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] binary = triton.compile(*compile_args, **compile_kwargs) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] File "/workspace/triton-cpu/python/triton/compiler/compiler.py", line 327, in compile E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] next_module = compile_ir(module, metadata) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 331, in <lambda> E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] stages["llir"] = lambda src, metadata: self.make_llir(src, metadata, options) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 294, in make_llir E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] llvm_mod = llvm.to_module(mod, context) E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] RuntimeError: failed to translate module to LLVM IR ERROR:common:Backend dynamo failed in warmup() Traceback (most recent call last): File "/workspace/pytorch/benchmarks/dynamo/common.py", line 2926, in warmup fn(model, example_inputs) File "/workspace/pytorch/torch/_dynamo/eval_frame.py", line 1062, in compile_wrapper raise e.remove_dynamo_frames() from None # see TORCHDYNAMO_VERBOSE=1 File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1047, in _compile_fx_inner raise InductorError(e, currentframe()).with_traceback( File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1039, in _compile_fx_inner mb_compiled_graph = fx_codegen_and_compile( File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1845, in fx_codegen_and_compile return scheme.codegen_and_compile(gm, example_inputs, inputs_to_check, graph_kwargs) File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1606, in codegen_and_compile compiled_module = graph.compile_to_module() File "/workspace/pytorch/torch/_inductor/graph.py", line 2613, in compile_to_module return self._compile_to_module() File "/workspace/pytorch/torch/_inductor/graph.py", line 2623, in _compile_to_module mod = self._compile_to_module_lines(wrapper_code) File "/workspace/pytorch/torch/_inductor/graph.py", line 2698, in _compile_to_module_lines mod = PyCodeCache.load_by_key_path( File "/workspace/pytorch/torch/_inductor/codecache.py", line 3980, in load_by_key_path mod = _reload_python_module(key, path, set_sys_modules=in_toplevel) File "/workspace/pytorch/torch/_inductor/runtime/compile_tasks.py", line 35, in _reload_python_module exec(code, mod.dict, mod.dict) File "/tmp/torchinductor_root/qy/cqysvr5mki7emctz4gjylnekmxv4trmi4xi55zvw4fabvgi353oi.py", line 1205, in <module> triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9 = async_compile.triton('triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9', ''' File "/workspace/pytorch/torch/_inductor/async_compile.py", line 493, in triton kernel.precompile( File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 517, in precompile self._precompile_worker() File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 539, in _precompile_worker compile_results.append(self._precompile_config(c)) File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 932, in _precompile_config binary = triton.compile(*compile_args, **compile_kwargs) File "/workspace/triton-cpu/python/triton/compiler/compiler.py", line 327, in compile next_module = compile_ir(module, metadata) File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 331, in <lambda> stages["llir"] = lambda src, metadata: self.make_llir(src, metadata, options) File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 294, in make_llir llvm_mod = llvm.to_module(mod, context) torch._inductor.exc.InductorError: RuntimeError: failed to translate module to LLVM IR

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"

Fix Action

Fix / Workaround

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 52 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 384 On-line CPU(s) list: 0-383 Vendor ID: GenuineIntel BIOS Vendor ID: Intel(R) Corporation Model name: Intel(R) Xeon(R) 6972P BIOS Model name: Intel(R) Xeon(R) 6972P CPU family: 6 Model: 173 Thread(s) per core: 2 Core(s) per socket: 96 Socket(s): 2 Stepping: 1 CPU max MHz: 3900.0000 CPU min MHz: 800.0000 BogoMIPS: 4800.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req hfi vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities ibpb_exit_to_user Virtualization: VT-x L1d cache: 9 MiB (192 instances) L1i cache: 12 MiB (192 instances) L2 cache: 384 MiB (192 instances) L3 cache: 960 MiB (2 instances) NUMA node(s): 6 NUMA node0 CPU(s): 0-31,192-223 NUMA node1 CPU(s): 32-63,224-255 NUMA node2 CPU(s): 64-95,256-287 NUMA node3 CPU(s): 96-127,288-319 NUMA node4 CPU(s): 128-159,320-351 NUMA node5 CPU(s): 160-191,352-383 Vulnerability Gather data sampling: Not affected Vulnerability Indirect target selection: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS Not affected; BHI BHI_DIS_S Vulnerability Srbds: Not affected Vulnerability Tsa: Not affected Vulnerability Tsx async abort: Not affected Vulnerability Vmscape: Mitigation; IBPB before exit to userspace

Code Example

cpu  eval  AlbertForMaskedLM                  
loc("/tmp/torchinductor_root/42/c4232kkgj37m2ftmtszd6tldrekdqddrcc3zq2q2ce32buia6xjs.py":60:5): error: cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: ttg.barrier
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] Triton compilation failed: triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] def triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, in_ptr3, xnumel, r0_numel, XBLOCK : tl.constexpr):
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     xnumel = 1
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     r0_numel = 512
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     R0_BLOCK: tl.constexpr = 512
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     rnumel = r0_numel
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     RBLOCK: tl.constexpr = R0_BLOCK
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     xoffset = tl.program_id(0) * XBLOCK
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     xmask = tl.full([XBLOCK], True, tl.int1)[:, None]
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     r0_index = tl.arange(0, R0_BLOCK)[None, :]
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     r0_offset = 0
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     r0_mask = tl.full([R0_BLOCK], True, tl.int1)[None, :]
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     roffset = r0_offset
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     rindex = r0_index
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     r0_0 = r0_index
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp0 = tl.load(in_ptr0 + (r0_0), None)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp12 = tl.load(in_ptr2 + (r0_0), None)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp14 = tl.load(in_ptr3 + (r0_0), None)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp1 = tl.full([1, 1], -100, tl.int64)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp2 = tmp0 != tmp1
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp3 = tl.full([1, 1], 0, tl.int64)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp4 = tl.where(tmp2, tmp0, tmp3)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp5 = tl.full([1, 1], 30000, tl.int32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp6 = tmp4 + tmp5
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp7 = tmp4 < 0
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp8 = tl.where(tmp7, tmp6, tmp4)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tl.device_assert((0 <= tmp8) & (tmp8 < 30000), "index out of bounds: 0 <= tmp8 < 30000")
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp10 = tl.load(in_ptr1 + (tmp8 + 30000*r0_0), None, eviction_policy='evict_last').to(tl.float32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp11 = tmp10.to(tl.float32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp13 = tmp11 - tmp12
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp15 = tl_math.log(tmp14)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp16 = tmp13 - tmp15
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp17 = -tmp16
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp18 = tl.full([1, 1], 0.0, tl.float32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp19 = tl.where(tmp2, tmp17, tmp18)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp20 = tl.broadcast_to(tmp19, [XBLOCK, R0_BLOCK])
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp22 = tl.sum(tmp20, 1)[:, None].to(tl.float32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp23 = tmp2.to(tl.int64)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp24 = tl.broadcast_to(tmp23, [XBLOCK, R0_BLOCK])
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp26 = tl.sum(tmp24, 1)[:, None].to(tl.int64)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp27 = tmp26.to(tl.float32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp28 = (tmp22 / tmp27)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tl.debug_barrier()
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tl.store(in_out_ptr0 + (tl.full([1, 1], 0, tl.int32).broadcast_to(XBLOCK, 1)), tmp28, None)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] 
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] metadata: {'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*i64', 'in_ptr1': '*bf16', 'in_ptr2': '*fp32', 'in_ptr3': '*fp32', 'xnumel': 'constexpr', 'r0_numel': 'i32', 'XBLOCK': 'constexpr'}, 'device': None, 'constants': {'xnumel': 1, 'XBLOCK': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]], (4,): [['tt.divisibility', 16]], (6,): [['tt.divisibility', 16]]}], 'device_type': 'cpu', 'num_warps': 4, 'num_stages': 1, 'debug': True, 'cc': ''}
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] Traceback (most recent call last):
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]   File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 932, in _precompile_config
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     binary = triton.compile(*compile_args, **compile_kwargs)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]   File "/workspace/triton-cpu/python/triton/compiler/compiler.py", line 327, in compile
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     next_module = compile_ir(module, metadata)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]   File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 331, in <lambda>
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     stages["llir"] = lambda src, metadata: self.make_llir(src, metadata, options)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]   File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 294, in make_llir
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     llvm_mod = llvm.to_module(mod, context)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] RuntimeError: failed to translate module to LLVM IR
ERROR:common:Backend dynamo failed in warmup()
Traceback (most recent call last):
  File "/workspace/pytorch/benchmarks/dynamo/common.py", line 2926, in warmup
    fn(model, example_inputs)
  File "/workspace/pytorch/torch/_dynamo/eval_frame.py", line 1062, in compile_wrapper
    raise e.remove_dynamo_frames() from None  # see TORCHDYNAMO_VERBOSE=1
  File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1047, in _compile_fx_inner
    raise InductorError(e, currentframe()).with_traceback(
  File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1039, in _compile_fx_inner
    mb_compiled_graph = fx_codegen_and_compile(
  File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1845, in fx_codegen_and_compile
    return scheme.codegen_and_compile(gm, example_inputs, inputs_to_check, graph_kwargs)
  File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1606, in codegen_and_compile
    compiled_module = graph.compile_to_module()
  File "/workspace/pytorch/torch/_inductor/graph.py", line 2613, in compile_to_module
    return self._compile_to_module()
  File "/workspace/pytorch/torch/_inductor/graph.py", line 2623, in _compile_to_module
    mod = self._compile_to_module_lines(wrapper_code)
  File "/workspace/pytorch/torch/_inductor/graph.py", line 2698, in _compile_to_module_lines
    mod = PyCodeCache.load_by_key_path(
  File "/workspace/pytorch/torch/_inductor/codecache.py", line 3980, in load_by_key_path
    mod = _reload_python_module(key, path, set_sys_modules=in_toplevel)
  File "/workspace/pytorch/torch/_inductor/runtime/compile_tasks.py", line 35, in _reload_python_module
    exec(code, mod.__dict__, mod.__dict__)
  File "/tmp/torchinductor_root/qy/cqysvr5mki7emctz4gjylnekmxv4trmi4xi55zvw4fabvgi353oi.py", line 1205, in <module>
    triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9 = async_compile.triton('triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9', '''
  File "/workspace/pytorch/torch/_inductor/async_compile.py", line 493, in triton
    kernel.precompile(
  File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 517, in precompile
    self._precompile_worker()
  File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 539, in _precompile_worker
    compile_results.append(self._precompile_config(c))
  File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 932, in _precompile_config
    binary = triton.compile(*compile_args, **compile_kwargs)
  File "/workspace/triton-cpu/python/triton/compiler/compiler.py", line 327, in compile
    next_module = compile_ir(module, metadata)
  File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 331, in <lambda>
    stages["llir"] = lambda src, metadata: self.make_llir(src, metadata, options)
  File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 294, in make_llir
    llvm_mod = llvm.to_module(mod, context)
torch._inductor.exc.InductorError: RuntimeError: failed to translate module to LLVM IR

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"

---

# Install triton-cpu 
git clone https://github.com/triton-lang/triton-cpu.git
cd triton-cpu
git submodule sync && git submodule update --init --recursive
pip install -r python/requirements.txt
pip install -e .

---

#!/bin/bash
set -e

cd /pytorch

export TORCHINDUCTOR_FREEZING=1
export OMP_NUM_THREADS=1

COMMON_ARGS=(
    --accuracy --amp -dcpu
    --inference --inductor --freezing
    --dynamic-shapes --dynamic-batch-only
    --only AlbertForMaskedLM
)

# --- Baseline: default cpp backend (expected: pass) ---
echo "=== [1/2] AlbertForMaskedLM  cpu_backend=cpp (baseline, should pass) ==="
unset TRITON_CPU_BACKEND
python benchmarks/dynamo/huggingface.py \
    "${COMMON_ARGS[@]}" \
    --output=/tmp/repro_albert_cpp.csv \
    2>&1 | grep -E "fail_to_run|^pass|accuracy|Error:|ttg.barrier|RuntimeError" || true

echo ""
echo "--- csv ---"
tail -1 /tmp/repro_albert_cpp.csv 2>/dev/null || true

# --- Repro: triton-cpu backend (expected: fail_to_run) ---
echo ""
echo "=== [2/2] AlbertForMaskedLM  cpu_backend=triton (repro, should fail) ==="
export TRITON_CPU_BACKEND=1
python benchmarks/dynamo/huggingface.py \
    "${COMMON_ARGS[@]}" \
    --output=/tmp/repro_albert_triton.csv \
    --inductor-config cpu_backend=triton \
    2>&1 | grep -E "fail_to_run|^pass|accuracy|Error:|ttg.barrier|RuntimeError" || true

echo ""
echo "--- csv ---"
tail -1 /tmp/repro_albert_triton.csv 2>/dev/null || true
echo ""
echo "Done."

---

Collecting environment information...
PyTorch version: 2.13.0a0+git0bdf1e5
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
Clang version: Could not collect
CMake version: version 3.31.10
Libc version: glibc-2.35

Python version: 3.10.20 | packaged by conda-forge | (main, Mar  5 2026, 16:42:22) [GCC 14.3.0] (64-bit runtime)
Python platform: Linux-6.8.0-111-generic-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
Caching allocator config: N/A

CPU:
Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           52 bits physical, 57 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  384
On-line CPU(s) list:                     0-383
Vendor ID:                               GenuineIntel
BIOS Vendor ID:                          Intel(R) Corporation
Model name:                              Intel(R) Xeon(R) 6972P
BIOS Model name:                         Intel(R) Xeon(R) 6972P
CPU family:                              6
Model:                                   173
Thread(s) per core:                      2
Core(s) per socket:                      96
Socket(s):                               2
Stepping:                                1
CPU max MHz:                             3900.0000
CPU min MHz:                             800.0000
BogoMIPS:                                4800.00
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req hfi vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities ibpb_exit_to_user
Virtualization:                          VT-x
L1d cache:                               9 MiB (192 instances)
L1i cache:                               12 MiB (192 instances)
L2 cache:                                384 MiB (192 instances)
L3 cache:                                960 MiB (2 instances)
NUMA node(s):                            6
NUMA node0 CPU(s):                       0-31,192-223
NUMA node1 CPU(s):                       32-63,224-255
NUMA node2 CPU(s):                       64-95,256-287
NUMA node3 CPU(s):                       96-127,288-319
NUMA node4 CPU(s):                       128-159,320-351
NUMA node5 CPU(s):                       160-191,352-383
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS Not affected; BHI BHI_DIS_S
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

Versions of relevant libraries:
[pip3] bert_pytorch==0.0.1a4
[pip3] functorch==1.14.0a0+b71aa0b
[pip3] intel-cmplr-lib-ur==2025.3.3
[pip3] intel-openmp==2025.3.3
[pip3] mypy==1.20.2
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.26.4
[pip3] onnx==1.21.0
[pip3] tcmlib==1.4.1
[pip3] torch==2.13.0a0+git0bdf1e5
[pip3] torch_geometric==2.4.0
[pip3] torchaudio==2.11.0a0+c0cbdb9
[pip3] torchdata==0.7.0a0+11bb5b8
[pip3] torchmultimodal==0.1.0b0
[pip3] torchtext==0.16.0a0+b0ebddc
[pip3] torchvision==0.27.0a0+8ad7115
[pip3] triton==3.7.0+git270e696d
[pip3] umf==1.0.3
[conda] bert-pytorch              0.0.1a4                  pypi_0    pypi
[conda] functorch                 1.14.0a0+b71aa0b          pypi_0    pypi
[conda] intel-cmplr-lib-ur        2025.3.3                 pypi_0    pypi
[conda] intel-openmp              2025.3.3                 pypi_0    pypi
[conda] mkl                       2025.3.1            h0e700b2_10    conda-forge
[conda] mkl-include               2025.3.1            hf2ce2f3_10    conda-forge
[conda] numpy                     1.26.4                   pypi_0    pypi
[conda] tbb                       2022.3.0             h8d10470_1    conda-forge
[conda] tcmlib                    1.4.1                    pypi_0    pypi
[conda] torch                     2.13.0a0+git0bdf1e5          pypi_0    pypi
[conda] torch-geometric           2.4.0                    pypi_0    pypi
[conda] torchaudio                2.11.0a0+c0cbdb9          pypi_0    pypi
[conda] torchdata                 0.7.0a0+11bb5b8          pypi_0    pypi
[conda] torchmultimodal           0.1.0b0                  pypi_0    pypi
[conda] torchtext                 0.16.0a0+b0ebddc          pypi_0    pypi
[conda] torchvision               0.27.0a0+8ad7115          pypi_0    pypi
[conda] triton                    3.7.0+git270e696d          pypi_0    pypi
[conda] umf                       1.0.3                    pypi_0    pypi
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

All HuggingFace models of the dynamo benchmark suites failed with the latest triton-cpu backend. Use AlbertForMaskedLM as example.

Error log

cpu  eval  AlbertForMaskedLM                  
loc("/tmp/torchinductor_root/42/c4232kkgj37m2ftmtszd6tldrekdqddrcc3zq2q2ce32buia6xjs.py":60:5): error: cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: ttg.barrier
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] Triton compilation failed: triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] def triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9(in_out_ptr0, in_ptr0, in_ptr1, in_ptr2, in_ptr3, xnumel, r0_numel, XBLOCK : tl.constexpr):
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     xnumel = 1
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     r0_numel = 512
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     R0_BLOCK: tl.constexpr = 512
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     rnumel = r0_numel
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     RBLOCK: tl.constexpr = R0_BLOCK
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     xoffset = tl.program_id(0) * XBLOCK
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     xindex = xoffset + tl.arange(0, XBLOCK)[:, None]
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     xmask = tl.full([XBLOCK], True, tl.int1)[:, None]
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     r0_index = tl.arange(0, R0_BLOCK)[None, :]
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     r0_offset = 0
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     r0_mask = tl.full([R0_BLOCK], True, tl.int1)[None, :]
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     roffset = r0_offset
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     rindex = r0_index
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     r0_0 = r0_index
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp0 = tl.load(in_ptr0 + (r0_0), None)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp12 = tl.load(in_ptr2 + (r0_0), None)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp14 = tl.load(in_ptr3 + (r0_0), None)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp1 = tl.full([1, 1], -100, tl.int64)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp2 = tmp0 != tmp1
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp3 = tl.full([1, 1], 0, tl.int64)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp4 = tl.where(tmp2, tmp0, tmp3)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp5 = tl.full([1, 1], 30000, tl.int32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp6 = tmp4 + tmp5
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp7 = tmp4 < 0
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp8 = tl.where(tmp7, tmp6, tmp4)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tl.device_assert((0 <= tmp8) & (tmp8 < 30000), "index out of bounds: 0 <= tmp8 < 30000")
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp10 = tl.load(in_ptr1 + (tmp8 + 30000*r0_0), None, eviction_policy='evict_last').to(tl.float32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp11 = tmp10.to(tl.float32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp13 = tmp11 - tmp12
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp15 = tl_math.log(tmp14)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp16 = tmp13 - tmp15
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp17 = -tmp16
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp18 = tl.full([1, 1], 0.0, tl.float32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp19 = tl.where(tmp2, tmp17, tmp18)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp20 = tl.broadcast_to(tmp19, [XBLOCK, R0_BLOCK])
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp22 = tl.sum(tmp20, 1)[:, None].to(tl.float32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp23 = tmp2.to(tl.int64)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp24 = tl.broadcast_to(tmp23, [XBLOCK, R0_BLOCK])
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp26 = tl.sum(tmp24, 1)[:, None].to(tl.int64)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp27 = tmp26.to(tl.float32)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tmp28 = (tmp22 / tmp27)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tl.debug_barrier()
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     tl.store(in_out_ptr0 + (tl.full([1, 1], 0, tl.int32).broadcast_to(XBLOCK, 1)), tmp28, None)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] 
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] metadata: {'signature': {'in_out_ptr0': '*fp32', 'in_ptr0': '*i64', 'in_ptr1': '*bf16', 'in_ptr2': '*fp32', 'in_ptr3': '*fp32', 'xnumel': 'constexpr', 'r0_numel': 'i32', 'XBLOCK': 'constexpr'}, 'device': None, 'constants': {'xnumel': 1, 'XBLOCK': 1}, 'native_matmul': False, 'enable_fp_fusion': True, 'launch_pdl': False, 'disable_ftz': False, 'configs': [{(0,): [['tt.divisibility', 16]], (2,): [['tt.divisibility', 16]], (3,): [['tt.divisibility', 16]], (4,): [['tt.divisibility', 16]], (6,): [['tt.divisibility', 16]]}], 'device_type': 'cpu', 'num_warps': 4, 'num_stages': 1, 'debug': True, 'cc': ''}
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] Traceback (most recent call last):
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]   File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 932, in _precompile_config
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     binary = triton.compile(*compile_args, **compile_kwargs)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]   File "/workspace/triton-cpu/python/triton/compiler/compiler.py", line 327, in compile
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     next_module = compile_ir(module, metadata)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]   File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 331, in <lambda>
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     stages["llir"] = lambda src, metadata: self.make_llir(src, metadata, options)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]   File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 294, in make_llir
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0]     llvm_mod = llvm.to_module(mod, context)
E0428 17:18:32.850000 100148 /workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py:934] [0/0] RuntimeError: failed to translate module to LLVM IR
ERROR:common:Backend dynamo failed in warmup()
Traceback (most recent call last):
  File "/workspace/pytorch/benchmarks/dynamo/common.py", line 2926, in warmup
    fn(model, example_inputs)
  File "/workspace/pytorch/torch/_dynamo/eval_frame.py", line 1062, in compile_wrapper
    raise e.remove_dynamo_frames() from None  # see TORCHDYNAMO_VERBOSE=1
  File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1047, in _compile_fx_inner
    raise InductorError(e, currentframe()).with_traceback(
  File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1039, in _compile_fx_inner
    mb_compiled_graph = fx_codegen_and_compile(
  File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1845, in fx_codegen_and_compile
    return scheme.codegen_and_compile(gm, example_inputs, inputs_to_check, graph_kwargs)
  File "/workspace/pytorch/torch/_inductor/compile_fx.py", line 1606, in codegen_and_compile
    compiled_module = graph.compile_to_module()
  File "/workspace/pytorch/torch/_inductor/graph.py", line 2613, in compile_to_module
    return self._compile_to_module()
  File "/workspace/pytorch/torch/_inductor/graph.py", line 2623, in _compile_to_module
    mod = self._compile_to_module_lines(wrapper_code)
  File "/workspace/pytorch/torch/_inductor/graph.py", line 2698, in _compile_to_module_lines
    mod = PyCodeCache.load_by_key_path(
  File "/workspace/pytorch/torch/_inductor/codecache.py", line 3980, in load_by_key_path
    mod = _reload_python_module(key, path, set_sys_modules=in_toplevel)
  File "/workspace/pytorch/torch/_inductor/runtime/compile_tasks.py", line 35, in _reload_python_module
    exec(code, mod.__dict__, mod.__dict__)
  File "/tmp/torchinductor_root/qy/cqysvr5mki7emctz4gjylnekmxv4trmi4xi55zvw4fabvgi353oi.py", line 1205, in <module>
    triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9 = async_compile.triton('triton_per_fused__log_softmax__to_copy_add_mul_native_layer_norm_nll_loss_forward_pow_tanh_view_9', '''
  File "/workspace/pytorch/torch/_inductor/async_compile.py", line 493, in triton
    kernel.precompile(
  File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 517, in precompile
    self._precompile_worker()
  File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 539, in _precompile_worker
    compile_results.append(self._precompile_config(c))
  File "/workspace/pytorch/torch/_inductor/runtime/triton_heuristics.py", line 932, in _precompile_config
    binary = triton.compile(*compile_args, **compile_kwargs)
  File "/workspace/triton-cpu/python/triton/compiler/compiler.py", line 327, in compile
    next_module = compile_ir(module, metadata)
  File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 331, in <lambda>
    stages["llir"] = lambda src, metadata: self.make_llir(src, metadata, options)
  File "/workspace/triton-cpu/python/triton/backends/cpu/compiler.py", line 294, in make_llir
    llvm_mod = llvm.to_module(mod, context)
torch._inductor.exc.InductorError: RuntimeError: failed to translate module to LLVM IR

Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"

Reproduce Scripts

# Install triton-cpu 
git clone https://github.com/triton-lang/triton-cpu.git
cd triton-cpu
git submodule sync && git submodule update --init --recursive
pip install -r python/requirements.txt
pip install -e .
#!/bin/bash
set -e

cd /pytorch

export TORCHINDUCTOR_FREEZING=1
export OMP_NUM_THREADS=1

COMMON_ARGS=(
    --accuracy --amp -dcpu
    --inference --inductor --freezing
    --dynamic-shapes --dynamic-batch-only
    --only AlbertForMaskedLM
)

# --- Baseline: default cpp backend (expected: pass) ---
echo "=== [1/2] AlbertForMaskedLM  cpu_backend=cpp (baseline, should pass) ==="
unset TRITON_CPU_BACKEND
python benchmarks/dynamo/huggingface.py \
    "${COMMON_ARGS[@]}" \
    --output=/tmp/repro_albert_cpp.csv \
    2>&1 | grep -E "fail_to_run|^pass|accuracy|Error:|ttg.barrier|RuntimeError" || true

echo ""
echo "--- csv ---"
tail -1 /tmp/repro_albert_cpp.csv 2>/dev/null || true

# --- Repro: triton-cpu backend (expected: fail_to_run) ---
echo ""
echo "=== [2/2] AlbertForMaskedLM  cpu_backend=triton (repro, should fail) ==="
export TRITON_CPU_BACKEND=1
python benchmarks/dynamo/huggingface.py \
    "${COMMON_ARGS[@]}" \
    --output=/tmp/repro_albert_triton.csv \
    --inductor-config cpu_backend=triton \
    2>&1 | grep -E "fail_to_run|^pass|accuracy|Error:|ttg.barrier|RuntimeError" || true

echo ""
echo "--- csv ---"
tail -1 /tmp/repro_albert_triton.csv 2>/dev/null || true
echo ""
echo "Done."

Versions

Collecting environment information...
PyTorch version: 2.13.0a0+git0bdf1e5
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
Clang version: Could not collect
CMake version: version 3.31.10
Libc version: glibc-2.35

Python version: 3.10.20 | packaged by conda-forge | (main, Mar  5 2026, 16:42:22) [GCC 14.3.0] (64-bit runtime)
Python platform: Linux-6.8.0-111-generic-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
Caching allocator config: N/A

CPU:
Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           52 bits physical, 57 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  384
On-line CPU(s) list:                     0-383
Vendor ID:                               GenuineIntel
BIOS Vendor ID:                          Intel(R) Corporation
Model name:                              Intel(R) Xeon(R) 6972P
BIOS Model name:                         Intel(R) Xeon(R) 6972P
CPU family:                              6
Model:                                   173
Thread(s) per core:                      2
Core(s) per socket:                      96
Socket(s):                               2
Stepping:                                1
CPU max MHz:                             3900.0000
CPU min MHz:                             800.0000
BogoMIPS:                                4800.00
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req hfi vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities ibpb_exit_to_user
Virtualization:                          VT-x
L1d cache:                               9 MiB (192 instances)
L1i cache:                               12 MiB (192 instances)
L2 cache:                                384 MiB (192 instances)
L3 cache:                                960 MiB (2 instances)
NUMA node(s):                            6
NUMA node0 CPU(s):                       0-31,192-223
NUMA node1 CPU(s):                       32-63,224-255
NUMA node2 CPU(s):                       64-95,256-287
NUMA node3 CPU(s):                       96-127,288-319
NUMA node4 CPU(s):                       128-159,320-351
NUMA node5 CPU(s):                       160-191,352-383
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS Not affected; BHI BHI_DIS_S
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

Versions of relevant libraries:
[pip3] bert_pytorch==0.0.1a4
[pip3] functorch==1.14.0a0+b71aa0b
[pip3] intel-cmplr-lib-ur==2025.3.3
[pip3] intel-openmp==2025.3.3
[pip3] mypy==1.20.2
[pip3] mypy_extensions==1.1.0
[pip3] numpy==1.26.4
[pip3] onnx==1.21.0
[pip3] tcmlib==1.4.1
[pip3] torch==2.13.0a0+git0bdf1e5
[pip3] torch_geometric==2.4.0
[pip3] torchaudio==2.11.0a0+c0cbdb9
[pip3] torchdata==0.7.0a0+11bb5b8
[pip3] torchmultimodal==0.1.0b0
[pip3] torchtext==0.16.0a0+b0ebddc
[pip3] torchvision==0.27.0a0+8ad7115
[pip3] triton==3.7.0+git270e696d
[pip3] umf==1.0.3
[conda] bert-pytorch              0.0.1a4                  pypi_0    pypi
[conda] functorch                 1.14.0a0+b71aa0b          pypi_0    pypi
[conda] intel-cmplr-lib-ur        2025.3.3                 pypi_0    pypi
[conda] intel-openmp              2025.3.3                 pypi_0    pypi
[conda] mkl                       2025.3.1            h0e700b2_10    conda-forge
[conda] mkl-include               2025.3.1            hf2ce2f3_10    conda-forge
[conda] numpy                     1.26.4                   pypi_0    pypi
[conda] tbb                       2022.3.0             h8d10470_1    conda-forge
[conda] tcmlib                    1.4.1                    pypi_0    pypi
[conda] torch                     2.13.0a0+git0bdf1e5          pypi_0    pypi
[conda] torch-geometric           2.4.0                    pypi_0    pypi
[conda] torchaudio                2.11.0a0+c0cbdb9          pypi_0    pypi
[conda] torchdata                 0.7.0a0+11bb5b8          pypi_0    pypi
[conda] torchmultimodal           0.1.0b0                  pypi_0    pypi
[conda] torchtext                 0.16.0a0+b0ebddc          pypi_0    pypi
[conda] torchvision               0.27.0a0+8ad7115          pypi_0    pypi
[conda] triton                    3.7.0+git270e696d          pypi_0    pypi
[conda] umf                       1.0.3                    pypi_0    pypi

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168 @aditew01 @chauhang @penguinwu @voznesenskym @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @aakhundov @coconutruben @jataylo @CaoE

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - 💡(How to fix) Fix [triton-cpu] All HuggingFace models of the dynamo benchmark suites failed with the latest triton-cpu backend