Skip to content

Commit

Permalink
note
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-barfoot committed Jun 15, 2023
1 parent 3764d92 commit 84e00af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions torchsparsegradutils/utils/random_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
This is as a result of the default linking of pytorch being with MKL LP64, which uses 32 bit integer indexing
NOTE: The batches of sparse CSR tensors are dependent: the number of specified elements in all batches must be the same.
This somewhat artificial constraint allows efficient storage of the indices of different CSR batches.
TODO: This code needs reformatting into just rand_sparse and rand_sparse_tri
TODO: Add support for non-strict triangular matrices
"""
import warnings
import torch
Expand Down Expand Up @@ -41,6 +44,7 @@ def rand_sparse_tri(
layout=torch.sparse_coo,
*,
upper=True,
strict=False,
indices_dtype=torch.int64,
values_dtype=torch.float32,
device=torch.device("cpu"),
Expand Down

0 comments on commit 84e00af

Please sign in to comment.