Skip to content

Commit 2f2dd12

Browse files
committed
typo
1 parent cc6f886 commit 2f2dd12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torch_scatter/kernel/kernel.cu

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ __global__ void indexBackwardKernel(TensorInfo<Real> output, TensorInfo<int64_t>
7575
KERNEL_LOOP(i, n) {
7676
int outputOffset = 0; int indexOffset = 0; int gradOffset = 0; int argOffset = 0;
7777
IndexToScatterOffsets4<Real, Real, int64_t, Dims>::compute(i, dim, index, &indexOffset, output, &outputOffset, grad, &gradOffset, arg, &argOffset);
78-
if (arg.data[argOffset] == (outputOffset / output.stride[dim]) % output.size[dim]) output.data[outputOffset] = grad.data[gradOffset];
78+
if (arg.data[argOffset] == (outputOffset / output.stride[dim]) % output.size[dim]) {
79+
output.data[outputOffset] = grad.data[gradOffset];
80+
}
7981
}
8082
}
8183

0 commit comments

Comments
 (0)