File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 3333 gpu-arch-version : " 12.1"
3434 - name : CUDA Nightly
3535 runs-on : linux.g5.12xlarge.nvidia.gpu
36- torch-spec : ' --pre torch==2.5.0.dev20240709+cu121 --index-url https://download.pytorch.org/whl/nightly/cu121'
36+ torch-spec : ' --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121'
3737 gpu-arch-type : " cuda"
3838 gpu-arch-version : " 12.1"
3939 - name : CPU 2.2.2
4848 gpu-arch-version : " "
4949 - name : CPU Nightly
5050 runs-on : linux.4xlarge
51- torch-spec : ' --pre torch==2.5.0.dev20240709+cpu --index-url https://download.pytorch.org/whl/nightly/cpu'
51+ torch-spec : ' --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu'
5252 gpu-arch-type : " cpu"
5353 gpu-arch-version : " "
5454
Original file line number Diff line number Diff line change 44 PerChannelSymmetricWeightUInt4Tensor ,
55)
66import unittest
7+ from unittest import TestCase , main
78from torch .ao .quantization .quantize_pt2e import prepare_pt2e , convert_pt2e
89from torch .ao .quantization .quantizer import QuantizationSpec , Quantizer
910
1011from torch ._export import capture_pre_autograd_graph
12+ from torch ._export import dynamic_dim
1113from torch .testing ._internal .common_quantization import (
1214 NodeSpec as ns ,
1315 QuantizationTestCase ,
1416)
17+ from torchao .quantization .utils import (
18+ compute_error ,
19+ )
1520from torchao .quantization .quant_api import (
1621 _replace_with_custom_fn_if_matches_filter ,
1722)
2530 QuantizationAnnotation ,
2631)
2732import copy
33+ from packaging import version
2834
2935
3036def _apply_weight_only_uint4_quant (model ):
@@ -223,4 +229,4 @@ def forward(self, x):
223229 )
224230
225231if __name__ == "__main__" :
226- unittest . main ()
232+ main ()
You can’t perform that action at this time.
0 commit comments