Skip to content

Commit

Permalink
remove unnecessary arg
Browse files Browse the repository at this point in the history
  • Loading branch information
kylesayrs committed Dec 19, 2024
1 parent ae895ef commit 05b68aa
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions tests/test_quantization/test_utils/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@


@pytest.mark.parametrize(
"dim,keepdims,strategy,exp_shape",
"keepdims,strategy,exp_shape",
[
(
tuple(),
False,
QuantizationStrategy.TENSOR,
torch.Size(
Expand All @@ -31,10 +30,9 @@
]
),
),
(tuple(), True, QuantizationStrategy.CHANNEL, torch.Size([1, 1])),
(tuple(), True, QuantizationStrategy.GROUP, torch.Size([1, 1])),
(True, QuantizationStrategy.CHANNEL, torch.Size([1, 1])),
(True, QuantizationStrategy.GROUP, torch.Size([1, 1])),
(
tuple(),
False,
QuantizationStrategy.BLOCK,
torch.Size(
Expand All @@ -43,13 +41,13 @@
]
),
),
(tuple(), True, QuantizationStrategy.TOKEN, torch.Size([1, 1])),
(True, QuantizationStrategy.TOKEN, torch.Size([1, 1])),
],
)
def test_calculate_qparams(dim, keepdims, strategy, exp_shape):
def test_calculate_qparams(keepdims, strategy, exp_shape):
value = torch.randn(14, 5)
min_val = torch.amin(value, dim=dim, keepdims=keepdims)
max_val = torch.amax(value, dim=dim, keepdims=keepdims)
min_val = torch.amin(value, dim=tuple(), keepdims=keepdims)
max_val = torch.amax(value, dim=tuple(), keepdims=keepdims)

if strategy == QuantizationStrategy.GROUP:
args = QuantizationArgs(strategy=strategy, group_size=2)
Expand Down

0 comments on commit 05b68aa

Please sign in to comment.