Skip to content

Commit

Permalink
Fix _get_transpose_info following fix to _coo_to_csr (fairinternal/xf…
Browse files Browse the repository at this point in the history
…ormers#1287)

After fixing the behavior of _coo_to_csr, that exposed an issue with _get_transpose_info that was not present because there was a double transposition

__original_commit__ = fairinternal/xformers@e464301
  • Loading branch information
fmassa authored and xFormers Bot committed Jan 31, 2025
1 parent 9457621 commit 9bb11fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xformers/sparse/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _get_transpose_info(m, n, row_indices, row_offsets, column_indices):
row_offsets_t, perm = column_indices.sort(dim=0, stable=True)
column_indices_t = row_coo[perm]

row_offsets_t, _ = _coo_to_csr(m, n, row_offsets_t, column_indices)
row_offsets_t, _ = _coo_to_csr(n, m, row_offsets_t, column_indices)
row_indices_t = _diffsort(row_offsets_t).int()

return row_indices_t, row_offsets_t, column_indices_t, perm
Expand Down

0 comments on commit 9bb11fa

Please sign in to comment.