Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ repos:
hooks:
# Run the linter.
- id: ruff
args: [--fix]
args:
- --fix
- --select
- F,I
# Run the formatter.
- id: ruff-format
4 changes: 2 additions & 2 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ include = [
"torchao/quantization/linear_activation_weight_observer.py",
"test/quantization/test_observer.py",
"test/dtypes/test_affine_quantized_float.py",
"torchao/quantization/weight_tensor_linear_activation_quantization.py"

"torchao/quantization/weight_tensor_linear_activation_quantization.py",
"torchao/dtypes/**/*.py",
]
27 changes: 14 additions & 13 deletions torchao/dtypes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
from .nf4tensor import NF4Tensor, to_nf4
# from ..prototype.dtypes.uint2 import UInt2Tensor, BitnetTensor
from .uint4 import UInt4Tensor
from .affine_quantized_tensor import (
AffineQuantizedTensor,
to_affine_quantized_intx,
to_affine_quantized_intx_static,
# experimental, will be merged into floatx in the future
to_affine_quantized_fpx,
to_affine_quantized_floatx,
to_affine_quantized_floatx_static,
Float8AQTTensorImpl,
Float8Layout,
Layout,
MarlinSparseLayout,
PlainLayout,
SemiSparseLayout,
TensorCoreTiledLayout,
Float8Layout,
Float8AQTTensorImpl,
MarlinSparseLayout,
to_affine_quantized_floatx,
to_affine_quantized_floatx_static,
# experimental, will be merged into floatx in the future
to_affine_quantized_fpx,
to_affine_quantized_intx,
to_affine_quantized_intx_static,
)
from .nf4tensor import NF4Tensor, to_nf4

# from ..prototype.dtypes.uint2 import UInt2Tensor, BitnetTensor
from .uint4 import UInt4Tensor

__all__ = [
"NF4Tensor",
"to_nf4",
"UInt4Tensor"
"UInt4Tensor",
"AffineQuantizedTensor",
"to_affine_quantized_intx",
"to_affine_quantized_intx_static",
Expand Down
Loading
Loading