yongwww commented on code in PR #14559:
URL: https://github.com/apache/tvm/pull/14559#discussion_r1161872282
##########
python/tvm/relax/transform/legalize_ops/grad.py:
##########
@@ -162,7 +162,7 @@ def gen_ir(output_grad_ptr, x_ptr, indices_ptr, out_ptr):
with ib.for_range(0, fused_shape) as i:
out[i] = tir.const(0, dtype=x_ptr.dtype)
- indices_len = indices_ptr.shape[0].value # must be 1-dim
+ indices_len = indices_ptr.shape[0] # must be 1-dim
Review Comment:
consider adding an assert for the "must be..."
--
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]