yuanfz98 opened a new pull request, #11643:
URL: https://github.com/apache/tvm/pull/11643

   This PR fix #11640. 
   
   This line throws error when in_axes is empty.
   ```
     ICHECK(in_axes[in_axes.size() - 1] < indim)
         << "Reduction axis " << in_axes[in_axes.size() - 1] << " exceeds input 
dimensions " << indim;
   ```
   
   ## Test
   ```
   from tvm import relay, ir
   import numpy as np
   
   x = relay.var('x', shape=(1,2,3))
   y = relay.sum(x, axis=(), keepdims=True, exclude=True)
   mod = ir.IRModule.from_expr(y)
   mod = relay.transform.InferType()(mod)
   x_input = np.array([[[1,2,3],[4,5,6]]]).astype("float32")
   
   z_output = relay.create_executor(mod=mod).evaluate()(x_input)
   print(z_output)
   ``` 
   Outputs:
   ```
   [[[21.]]]
   ```


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