AndrewZhaoLuo opened a new pull request #10418:
URL: https://github.com/apache/tvm/pull/10418


   Small mistake:
   
   Previously the before would not return the correct shape:
   ```
   import numpy as np
   import tvm
   from tvm import relay
   from tvm.relay import vm
   from tvm.runtime import vm as vm_rt
   
   input = relay.var("input", shape=[relay.Any(), 3])
   
   result = relay.strided_slice(
       input,
       begin=[1],
       end=[2],
       strides=[1],
       axes=[1],
   )
   # result = relay.squeeze(result, axis=[1])
   
   mod = tvm.IRModule.from_expr(result)
   dev = tvm.device("llvm", 0)
   host = tvm.cpu()
   exe = vm.compile(mod, "llvm", params={})
   relay_vm = vm_rt.VirtualMachine(exe, dev)
   
   # size=[1,3], size=[0, 3] fails
   result = relay_vm.run(np.random.uniform(0, 1, size=[1, 3]).astype("float32"))
   
   print(result.numpy().shape)
   ```
   
   Now it does


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