Skip to content

Commit

Permalink
Fix MP test
Browse files Browse the repository at this point in the history
  • Loading branch information
elad-c committed Jan 21, 2025
1 parent fca1011 commit 182d9c9
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,22 @@ def get_tpc(self):
qco_16 = QuantizationConfigOptions(base_config=base_cfg_16,
quantization_configurations=quantization_configurations)

add_qco = get_config_options_by_operators_set(tpc, OperatorSetNames.ADD)
base_cfg_8 = [l for l in add_qco.quantization_configurations if l.activation_n_bits == 8][0]
add_qco_8 = QuantizationConfigOptions(base_config=base_cfg_8, quantization_configurations=[base_cfg_8])

sub_qco = get_config_options_by_operators_set(tpc, OperatorSetNames.SUB)
base_cfg_8 = [l for l in sub_qco.quantization_configurations if l.activation_n_bits == 8][0]
sub_qco_8 = QuantizationConfigOptions(base_config=base_cfg_8, quantization_configurations=[base_cfg_8])

tpc = generate_custom_test_tpc(
name="custom_16_bit_tpc",
base_cfg=tpc.default_qco.base_config,
base_tpc=tpc,
operator_sets_dict={
OperatorSetNames.MUL: qco_16,
OperatorSetNames.ADD: add_qco_8,
OperatorSetNames.SUB: sub_qco_8,
})

return tpc
Expand Down

0 comments on commit 182d9c9

Please sign in to comment.