Open noahbadoa opened 2 months ago
Do you mean indptr = torch.tensor([0, 3, 8])
?
No i explicitly meant for the range of indptr not to be the same as x.
Interestingly indptr = torch.tensor([1, 8])
works without issue.
Ok, but this is undefined behavior. If you wanna support [0, 3, 7]
, then you need to input x[:, :7]
.
I don't think this is be undefined behavior, the correct value of gradient of src where indptr does not index src should be zeros. reduce="min"
and reduce="max"
already have this behavior. If this usage of indptr is not explicitly not supported it would be nice if either this is documented or the function fails in a more graceful way; raising an assert instead of returning uninitialized memory in the case of reduce=sum
.
Minimum example