blksprs 2.1.6__py3-none-any.whl → 2.1.7__py3-none-any.whl
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.
- blksprs/__init__.py +1 -1
- blksprs/utils/validation.py +6 -5
- {blksprs-2.1.6.dist-info → blksprs-2.1.7.dist-info}/METADATA +1 -1
- {blksprs-2.1.6.dist-info → blksprs-2.1.7.dist-info}/RECORD +6 -6
- {blksprs-2.1.6.dist-info → blksprs-2.1.7.dist-info}/WHEEL +0 -0
- {blksprs-2.1.6.dist-info → blksprs-2.1.7.dist-info}/top_level.txt +0 -0
blksprs/__init__.py
CHANGED
blksprs/utils/validation.py
CHANGED
|
@@ -6,10 +6,11 @@ VALIDATION = True
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def ensure_contiguous(*tensors: Tensor) -> tuple[Tensor, ...]:
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
137
|
-
return
|
|
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.
|
|
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,4 +1,4 @@
|
|
|
1
|
-
blksprs/__init__.py,sha256=
|
|
1
|
+
blksprs/__init__.py,sha256=Kq4YytK5Im-70RGrH1hj39qgc77tL_DH0Gc3KpZgijQ,1631
|
|
2
2
|
blksprs/layouting/distribution_layout.py,sha256=ur1ty_2U-Hfj78hMWsLZvu7ZuGhzW3qGLKMc72DfTZM,5861
|
|
3
3
|
blksprs/layouting/sparsity_layout.py,sha256=eXHmu2h7K5Q-YUpfOxocJoeP_5ZoQFZf_eHLxRZQbYU,11207
|
|
4
4
|
blksprs/ops/conversion.py,sha256=NcBxWWWzMkjQx_fEfh14RWt688X6J82FzDqByAd3Pj4,21405
|
|
@@ -16,8 +16,8 @@ blksprs/utils/benchmarking.py,sha256=dLabDscTFn5NkmOI1g7DnKeTneUYW3RIVv9MDF-8BKc
|
|
|
16
16
|
blksprs/utils/blksprs_tensor.py,sha256=pfoz59aJixj_fIoFx76ySiygwRQUemmgjMKepZ2c4j0,244
|
|
17
17
|
blksprs/utils/processing.py,sha256=RNkEDc0g-sNHRuMPkRzNWU13d3_lIkXMJdoqES4yQTM,3738
|
|
18
18
|
blksprs/utils/tools.py,sha256=TKygEKge4wJtJnXXDg8BTL8vzBpqIJsQ_A3_5FmLpcE,859
|
|
19
|
-
blksprs/utils/validation.py,sha256=
|
|
20
|
-
blksprs-2.1.
|
|
21
|
-
blksprs-2.1.
|
|
22
|
-
blksprs-2.1.
|
|
23
|
-
blksprs-2.1.
|
|
19
|
+
blksprs/utils/validation.py,sha256=P98sCk6PZCQB0wO3scGTJIXfkv5EpHFM_uNHBXr42n4,4844
|
|
20
|
+
blksprs-2.1.7.dist-info/METADATA,sha256=A7ZUYLyq7D8A243kuLSUVu2GKrPEp8-Bi5EYVFgbMdU,9590
|
|
21
|
+
blksprs-2.1.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
22
|
+
blksprs-2.1.7.dist-info/top_level.txt,sha256=qyp0IHeY3H2GQA97i4hk_To5rRBS2YcE1HRPSLy04fk,8
|
|
23
|
+
blksprs-2.1.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|