duduhedangdang opened a new issue, #18099:
URL: https://github.com/apache/tvm/issues/18099

   ### Expected behavior
   Running the generated model with `tvm.runtime.GraphExecutor.run()` should 
finish without crashing.  
   If the input tensor dtype is mismatched, TVM should gracefully raise a 
Python‐level error instead of hitting an internal `CHECK` and aborting.
   
   ### Actual behavior
   TVM aborts at runtime with an assertion failure in 
`src/runtime/library_module.cc`:
   
   
   ### Environment
   | Item | Value |
   |------|-------|
   | **TVM commit** |  v0.9.dev0 |
   | **OS** | Ubuntu 20.04 |
   | **Python** | 3.8.13 (conda env) |
   | **LLVM** | `<llvm-config --10.0.0>` |
   | **Model source** | auto-generated ONNX via our fuzzing script |
   
   ERROR:
   python /home/heyifei/anaconda3/envs/main.py --max_nodes 10 --seed 976170717 
--viz_graph
   Traceback (most recent call last):
     [bt] (6) /tvm/build/libtvm.so(TVMFuncCall+0x6d) [0x75be7579395d]
     [bt] (5) /tvm/build/libtvm.so(+0x32bc16a) [0x75be758a716a]
     [bt] (4) /tvm/build/libtvm.so(tvm::runtime::GraphExecutor::Run()+0x48) 
[0x75be75896248]
     [bt] (3) /tvm/build/libtvm.so(+0x32ba3ce) [0x75be758a53ce]
     [bt] (2) /tvm/build/libtvm.so(+0x31c9a25) [0x75be757b4a25]
     [bt] 
(1)/tvm/build/libtvm.so(tvm::runtime::detail::LogFatal::Entry::Finalize()+0x67) 
[0x75be7346b157]
     [bt] (0) /tvm/build/libtvm.so(tvm::runtime::Backtrace[abi:cxx11]()+0x1b) 
[0x75be757b676b]
     File "/tvm/src/runtime/library_module.cc", line 80
   TVMError: 
   ---------------------------------------------------------------
   An error occurred during the execution of TVM.
   For more information, please see: https://tvm.apache.org/docs/errors.html
   ---------------------------------------------------------------
   
     Check failed: ret == 0 (-1 vs. 0) : Assert fail: 
(((tir.tvm_struct_get(arg.placeholder_red, 0, 5) == (uint8)0) && 
(tir.tvm_struct_get(arg.placeholder_red, 0, 6) == (uint8)64)) && 
(tir.tvm_struct_get(arg.placeholder_red, 0, 7) == (uint16)1)), 
arg.placeholder_red.dtype is expected to be int64
   
   
[2025-04-15-15-37-12_none_opt-1.zip](https://github.com/user-attachments/files/20961652/2025-04-15-15-37-12_none_opt-1.zip)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to