Skip to content

Commit 34eaaf0

Browse files
authored
Add OPAQUE packing format (#2878)
Summary: Adding the packing format first that could be used by previously int4 cpu and int8 + int4 packed tensor since these does not have a fixed packing format Test Plan: CI Reviewers: Subscribers: Tasks: Tags:
1 parent c93bc7d commit 34eaaf0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

torchao/quantization/quantize_/common/packing_format.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ class PackingFormat(str, Enum):
3737
MARLIN_SPARSE = "marlin_sparse"
3838

3939
"""
40-
Unpacked means the subbyte quantized data is stored as int8
40+
Unpacked to int8 means the subbyte quantized data is stored as int8
4141
"""
4242
UNPACKED_TO_INT8 = "unpacked_to_int8"
43+
44+
"""
45+
Opaque packing format that's used for tensors that does not have a predefined packing format
46+
(that may be decided on hardware, tensor shape, library availability etc.) and it's not
47+
needed for the rest of the system to understand the specific format that's adopted.
48+
"""
49+
OPAQUE = "opaque"

0 commit comments

Comments
 (0)