Skip to content

Commit 4830268

Browse files
committed
up
1 parent 680f222 commit 4830268

File tree

2 files changed

+2
-32
lines changed

2 files changed

+2
-32
lines changed

.github/workflows/torchao_experimental_test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ jobs:
3535
conda activate venv
3636
pip install --extra-index-url "https://download.pytorch.org/whl/nightly/cpu" torch=="2.6.0.dev20250104"
3737
pip install numpy
38+
pip install pytest
3839
USE_CPP=1 pip install .
3940
- name: Run tests
4041
run: |
4142
conda activate venv
42-
python torchao/experimental/tests/test_packed_linear_int8_dynamic_activation_intx_weight_layout.py
43-
python torchao/experimental/tests/test_q_dq_layout.py
43+
pytest torchao/experimental/tests/test_int8_dynamic_activation_intx_weight.py

torchao/experimental/q_dq_layout.py

-30
Original file line numberDiff line numberDiff line change
@@ -54,36 +54,6 @@ def _linear_impl(input_tensor, weight_tensor, bias):
5454
weight_tensor = weight_tensor.dequantize()
5555
return torch.nn.functional.linear(input_tensor, weight_tensor, bias)
5656

57-
# assert isinstance(input_tensor, )
58-
# if isinstance(input_tensor, AffineQuantizedTensor):
59-
60-
# input_tensor = input_tensor.dequantize()
61-
# if isinstance(weight_tensor, AffineQuantizedTensor):
62-
# weight_tensor = weight_tensor.dequantize()
63-
# return torch.nn.functional.linear(input_tensor, weight_tensor, bias)
64-
65-
# x = per_token_dynamic_quant(input_tensor)
66-
67-
# w_int_data = weight_tensor.tensor_impl.int_data
68-
# w_scale = weight_tensor.tensor_impl.scale
69-
# w_zero_point = weight_tensor.tensor_impl.zero_point
70-
# assert len(weight_tensor.block_size) == 2
71-
# assert weight_tensor.block_size[0] == 1
72-
# group_size = weight_tensor.block_size[1]
73-
74-
# w_dq = _quantized_decomposed_dequantize_per_channel_group_wrapper(
75-
# w_int_data,
76-
# w_scale,
77-
# w_zero_point,
78-
# weight_tensor.quant_min,
79-
# weight_tensor.quant_max,
80-
# torch.int8,
81-
# group_size,
82-
# torch.float32,
83-
# )
84-
85-
# return torch.nn.functional.linear(x, w_dq, bias)
86-
8757

8858
register_aqt_quantized_linear_dispatch(
8959
_linear_check,

0 commit comments

Comments
 (0)