Skip to content

Commit ce8934c

Browse files
committed
Merge branch 'main' into aqt_refactor
2 parents 7bc89bc + e41ca4e commit ce8934c

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

torchao/dtypes/__init__.py

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
from .nf4tensor import NF4Tensor, to_nf4
2-
3-
# from ..prototype.dtypes.uint2 import UInt2Tensor, BitnetTensor
4-
from .uintx import UInt4Tensor
51
from .affine_quantized_tensor import (
62
AffineQuantizedTensor,
7-
to_affine_quantized_intx,
8-
to_affine_quantized_intx_static,
9-
# experimental, will be merged into floatx in the future
10-
to_affine_quantized_fpx,
11-
to_affine_quantized_floatx,
12-
to_affine_quantized_floatx_static,
13-
)
14-
15-
from . import affine_quantized_tensor_ops
16-
from .utils import (
3+
Float8AQTTensorImpl,
4+
Float8Layout,
175
Layout,
6+
MarlinSparseLayout,
187
PlainLayout,
198
)
209
from .floatx import (
@@ -31,10 +20,17 @@
3120
UInt4Tensor,
3221
SemiSparseLayout,
3322
TensorCoreTiledLayout,
34-
MarlinSparseLayout,
35-
PlainAQTTensorImpl,
36-
BlockSparseLayout,
23+
to_affine_quantized_floatx,
24+
to_affine_quantized_floatx_static,
25+
# experimental, will be merged into floatx in the future
26+
to_affine_quantized_fpx,
27+
to_affine_quantized_intx,
28+
to_affine_quantized_intx_static,
3729
)
30+
from .nf4tensor import NF4Tensor, to_nf4
31+
32+
# from ..prototype.dtypes.uint2 import UInt2Tensor, BitnetTensor
33+
from .uint4 import UInt4Tensor
3834

3935
__all__ = [
4036
"NF4Tensor",

torchao/dtypes/floatx/floatx_tensor_core_layout.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
from dataclasses import dataclass
12
from functools import reduce
2-
from typing import Tuple, Optional
3+
from typing import Optional, Tuple
34

45
import torch
56
from torch import Tensor

0 commit comments

Comments
 (0)