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

   ### Expected behavior
   
   Pass compilation.
   
   ### Actual behavior
   
   Graph runtime terminates at runtime after compiling a valid model due to 
failed integer type checking. Similar issue: 
https://github.com/apache/tvm/issues/11794 
https://github.com/apache/tvm/issues/13044
   
   ### Environment
   
   
https://github.com/apache/tvm/commit/fa17da22c73fb9e95c27e4c28130835b628caf6b 
on Ubuntu 20.04.
   
   ### Steps to reproduce
   
   Preferably a minimal script to cause the issue to occur.
   
   ```python
   import tvm
   from tvm import relay
   import numpy as np
   
   """
   fn (%i0: Tensor[(1, 2), int32]) {
     %0 = squeeze(%i0, axis=[0]);
     %1 = broadcast_to(%0, shape=[2i64]);
     argmin(%1, axis=[0])
   }
   """
   
   i0 = relay.var("i0", shape=(1, 2), dtype="int32")
   squeeze = relay.squeeze(i0, axis=[0])
   broadcast = relay.broadcast_to(squeeze, shape=relay.const([2], "int64"))
   argmin = relay.argmin(broadcast, axis=[0])
   
   f = relay.Function([i0], argmin)
   print(f)
   relay.create_executor("graph", device=tvm.cpu(), target="llvm").evaluate(f)(
       np.zeros((1, 2), dtype="int32")
   )
   
   """
     Check failed: ret == 0 (-1 vs. 0) : Assert fail: 
   (((tir.tvm_struct_get(arg.T_broadcast_to_red, 0, 5) == (uint8)0) && 
   (tir.tvm_struct_get(arg.T_broadcast_to_red, 0, 6) == (uint8)32)) && 
   (tir.tvm_struct_get(arg.T_broadcast_to_red, 0, 7) == (uint16)1)), 
   arg.T_broadcast_to_red.dtype is expected to be int32
   """
   ```
   
   ### Triage
   
   Please refer to the list of label tags linked above to find the relevant 
tags and add them here in a bullet format (example below).
   
   * needs-triage
   


-- 
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