blksprs 2.1.6__tar.gz → 2.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {blksprs-2.1.6 → blksprs-2.1.7}/PKG-INFO +1 -1
  2. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/__init__.py +1 -1
  3. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/utils/validation.py +6 -5
  4. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs.egg-info/PKG-INFO +1 -1
  5. {blksprs-2.1.6 → blksprs-2.1.7}/pyproject.toml +1 -1
  6. {blksprs-2.1.6 → blksprs-2.1.7}/README.md +0 -0
  7. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/layouting/distribution_layout.py +0 -0
  8. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/layouting/sparsity_layout.py +0 -0
  9. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/ops/conversion.py +0 -0
  10. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/ops/distribution.py +0 -0
  11. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/ops/flow.py +0 -0
  12. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/ops/matmul.py +0 -0
  13. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/ops/misc/broadcast_ops.py +0 -0
  14. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/ops/misc/row_wise.py +0 -0
  15. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/ops/partitioning.py +0 -0
  16. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/ops/repeat.py +0 -0
  17. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/ops/softmax.py +0 -0
  18. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/ops/transpose.py +0 -0
  19. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/utils/autotuning.py +0 -0
  20. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/utils/benchmarking.py +0 -0
  21. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/utils/blksprs_tensor.py +0 -0
  22. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/utils/processing.py +0 -0
  23. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs/utils/tools.py +0 -0
  24. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs.egg-info/SOURCES.txt +0 -0
  25. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs.egg-info/dependency_links.txt +0 -0
  26. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs.egg-info/requires.txt +0 -0
  27. {blksprs-2.1.6 → blksprs-2.1.7}/blksprs.egg-info/top_level.txt +0 -0
  28. {blksprs-2.1.6 → blksprs-2.1.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blksprs
3
- Version: 2.1.6
3
+ Version: 2.1.7
4
4
  Summary: A lightweight library for operations on block-sparse matrices in PyTorch.
5
5
  Author-email: Felix Schön <schoen@kr.tuwien.ac.at>
6
6
  Project-URL: Homepage, https://github.com/FelixSchoen/blksprs
@@ -1,6 +1,6 @@
1
1
  from blksprs.utils.blksprs_tensor import BlksprsTensor
2
2
 
3
- __version__ = "2.1.6"
3
+ __version__ = "2.1.7"
4
4
 
5
5
 
6
6
  class ops:
@@ -6,10 +6,11 @@ VALIDATION = True
6
6
 
7
7
 
8
8
  def ensure_contiguous(*tensors: Tensor) -> tuple[Tensor, ...]:
9
- if _check_skip_contiguous():
10
- return tensors
9
+ transformed = tensors
10
+
11
+ if _check_contiguous():
12
+ transformed = tuple(tensor.contiguous() for tensor in tensors)
11
13
 
12
- transformed = tuple(tensor.contiguous() for tensor in tensors)
13
14
  return transformed[0] if len(transformed) == 1 else transformed
14
15
 
15
16
 
@@ -133,8 +134,8 @@ def validate_sparsity_block_size(sparsity_block_size: int, *tensors):
133
134
  raise ValueError("Tensor sizes must be divisible by sparsity block size")
134
135
 
135
136
 
136
- def _check_skip_contiguous():
137
- return not CONTIGUOUS
137
+ def _check_contiguous():
138
+ return CONTIGUOUS
138
139
 
139
140
 
140
141
  def _set_skip_contiguous(skip_contiguous: bool):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blksprs
3
- Version: 2.1.6
3
+ Version: 2.1.7
4
4
  Summary: A lightweight library for operations on block-sparse matrices in PyTorch.
5
5
  Author-email: Felix Schön <schoen@kr.tuwien.ac.at>
6
6
  Project-URL: Homepage, https://github.com/FelixSchoen/blksprs
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "blksprs"
3
- version = "2.1.6"
3
+ version = "2.1.7"
4
4
  authors = [{ name = "Felix Schön", email = "schoen@kr.tuwien.ac.at" }]
5
5
  description = "A lightweight library for operations on block-sparse matrices in PyTorch."
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes