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

   I have this Relay Program:
   ```
   import numpy as np
   import tvm
   from tvm import relay, transform, IRModule
   
   x_shape = (1, relay.Any(), 100, 17, 1)
   
   x = relay.var('x', shape=x_shape)
   y = relay.squeeze(x, axis=[-1])
   y = relay.sqrt(y)
   mod = IRModule.from_expr(y)
   with transform.PassContext(opt_level=1):
       vm_exec = relay.vm.compile(mod, target='llvm')
   vm = tvm.runtime.vm.VirtualMachine(vm_exec, tvm.cpu())
   
   x_input = np.zeros(shape=(1, 100, 100, 17, 1), dtype='float32')
   data = vm.run(x=x_input)
   ```
   
   ### Expected behavior
   
   run correctly.
   
   ### Actual behavior
   
   raise error:
   `Check failed: ret == 0 (-1 vs. 0) : Assert fail: 4 == 
T.tvm_struct_get(arg_T_sqrt, 0, 4, "int32"), arg.T_sqrt.ndim is expected to 
equal 4`
   
   ### Environment
   
   None
   
   ### Steps to reproduce
   
   run this case
   
   I find in squeeze shape function:
   
https://github.com/apache/tvm/blob/f21a17b67cfd1efb40dbb2271ebca28e7a7c450f/python/tvm/relay/op/_transform.py#L914-L927
   Here if the axis is -1, then will get the wrong result.


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