masahi commented on a change in pull request #7391:
URL: https://github.com/apache/tvm/pull/7391#discussion_r572705549
##########
File path: python/tvm/topi/cumsum.py
##########
@@ -84,12 +93,18 @@ def gen_ir(data_buf, out_buf):
i = fused // axis_mul_after
j = fused % axis_mul_after
base_idx = i * cumsum_axis_len * axis_mul_after + j
- out_buf[base_idx] = maybe_cast(data_buf[base_idx])
+ if exclusive == 0:
+ out_buf[base_idx] = maybe_cast(data_buf[base_idx])
+ else:
+ out_buf[base_idx] = 0.0
Review comment:
This will likely give an error if the input is an integer tensor. Need
to cast 0 to `dtype`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]