Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update test_static_quant.py
  • Loading branch information
violetch24 authored Jun 13, 2024
commit 50066609788a1272e4a73e149783fe5904c62bfc
4 changes: 2 additions & 2 deletions test/3x/torch/quantization/test_static_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_static_quant_fallback(self):
)
def test_static_quant_params(self, act_sym, act_algo):
fp32_model = copy.deepcopy(self.fp32_model)
quant_config = StaticQuantConfig(act_sym=act_sym, act_algo=act_algo, excluded_precisions=["bf16"])
quant_config = StaticQuantConfig(act_sym=act_sym, act_algo=act_algo)
example_inputs = self.input
prepared_model = prepare(fp32_model, quant_config=quant_config, example_inputs=example_inputs)
run_fn(prepared_model)
Expand All @@ -139,7 +139,7 @@ def run_fn(model):
fp32_model = copy.deepcopy(model)
fp32_model.linear.weight = torch.nn.Parameter(torch.tensor([[0.0, 1.0], [1.0, 0.0]]))
example_inputs = torch.zeros(3, 2)
quant_config = StaticQuantConfig(act_sym=True, act_algo="kl", excluded_precisions=["bf16"])
quant_config = StaticQuantConfig(act_sym=True, act_algo="kl")
prepared_model = prepare(fp32_model, quant_config=quant_config, example_inputs=example_inputs)
run_fn(prepared_model)
q_model = convert(prepared_model)
Expand Down