Skip to content

Commit

Permalink
Fix dtype index bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
luisenp committed Dec 5, 2022
1 parent 28778a5 commit 4a78a03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion theseus/utils/sparse_matrix_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _sparse_mat_vec_bwd_backend(
for row in range(num_rows):
start = A_row_ptr[row]
end = A_row_ptr[row + 1]
columns = A_col_ind[start:end]
columns = A_col_ind[start:end].long()
if is_tmat:
A_grad[:, start:end] = v[:, row].view(-1, 1) * grad_output[:, columns]
v_grad[:, row] = (grad_output[:, columns] * A_val[:, start:end]).sum(dim=1)
Expand Down

0 comments on commit 4a78a03

Please sign in to comment.