You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by "XYZboom (via GitHub)" <gi...@apache.org> on 2026/07/25 14:59:30 UTC
Re: [I] [Bug] LLVM CodeGen Crash on `avg_pool2d` with Specific Shape [tvm]
XYZboom commented on issue #20015:
URL: https://github.com/apache/tvm/issues/20015#issuecomment-5078954616
A variant:
```python
bb = relax.BlockBuilder()
v = relax.Var("x", relax.TensorStructInfo(shape=[4, 5, 2, 1], dtype="float32"))
with bb.function("f", [v]):
out = bb.emit(relax.op.nn.silu(v))
bb.emit_func_output(out)
mod = bb.get()
# Crashes here
ex = relax.build(mod, target="llvm")
```
Error log:
```
Traceback (most recent call last):
File "/root/autodl-tmp/data/AIFuzzerData/tvm/20015/variant/main.py", line 14, in <module>
ex = relax.build(mod, target="llvm")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/tvm/relax/vm_build.py", line 276, in build
return _vmlink(
^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/tvm/relax/vm_build.py", line 157, in _vmlink
lib = tvm.tirx.build(tir_mod, target=target, pipeline=tir_pipeline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/tvm/tirx/build.py", line 240, in build
return tir_to_runtime(host_mod, device_mod_dict, target_host)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/tvm/tirx/build.py", line 148, in tir_to_runtime
mhost = codegen_build(mhost_all, target_host)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/tvm/tirx/build.py", line 130, in codegen_build
return bf(mod, target)
^^^^^^^^^^^^^^^
File "python/tvm_ffi/cython/function.pxi", line 968, in tvm_ffi.core.Function.__call__
File "/project/src/target/llvm/codegen_llvm.cc", line 346, in void tvm::codegen::CodeGenLLVM::Verify() const
tvm.error.InternalError: LLVM module verification failed with the following errors:
Instruction does not dominate all uses!
%178 = shufflevector <4 x float> %159, <4 x float> %175, <2 x i32> <i32 2, i32 6>, !dbg !35
%34 = shufflevector <2 x float> %178, <2 x float> %33, <4 x i32> <i32 0, i32 1, i32 2, i32 3>, !dbg !35
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org