Skip to content

Commit 4ea589b

Browse files
Update src/compressed_tensors/compressors/sparse_compressors/sparse_24_bitmask.py
Co-authored-by: Brian Dellabetta <brian-dellabetta@users.noreply.github.com>
1 parent e8e7a7d commit 4ea589b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compressed_tensors/compressors/sparse_compressors/sparse_24_bitmask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def sparse24_bitmask_compress(
176176
SparsityStructure(sparsity_structure) == SparsityStructure.TWO_FOUR
177177
), "Only 2:4 sparsity is supported"
178178

179-
if tensor.device.type == "meta":
179+
if tensor.is_meta:
180180
num_rows, num_cols = tensor.shape
181181
compressed_values = torch.empty((num_rows, num_cols // 2), dtype=tensor.dtype, device="meta")
182182
packed_cols = (num_cols + 7) // 8

0 commit comments

Comments
 (0)