Unverified Commit e547490c authored by Loïc Magne's avatar Loïc Magne Committed by GitHub
Browse files

scatter_add_ -> index_add_ (#179)

parent 9a1c0ab5
......@@ -190,11 +190,10 @@ def accumulate_along_rays(
n_rays = int(ray_indices.max()) + 1
# assert n_rays > ray_indices.max()
index = ray_indices[:, None].expand(-1, src.shape[-1])
outputs = torch.zeros(
(n_rays, src.shape[-1]), device=src.device, dtype=src.dtype
)
outputs.scatter_add_(0, index, src)
outputs.index_add_(0, ray_indices, src)
return outputs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment