Skip to content

Commit

Permalink
mark EbmerddingBag with q8_w_sym_any_nr
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil-lyakhov committed Jan 31, 2025
1 parent cfedaf7 commit 403fb59
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion nncf/common/hardware/configs/npu.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
"type": "EmbeddingBag",
"quantization": {
"weights": [
"q8_w_sym", "q8_w_asym"
"q8_w_sym_any_nr", "q8_w_asym"
]
}
},
Expand Down
2 changes: 0 additions & 2 deletions tests/cross_fw/shared/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ def default(self, o):
return int(o)
if isinstance(o, np.floating):
return float(o)
if isinstance(o, Tensor):
o = o.data
if isinstance(o, np.ndarray):
return o.tolist()
if isinstance(o, torch.Tensor):
Expand Down
32 changes: 16 additions & 16 deletions tests/cross_fw/test_templates/fq_params/fq_params.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
{
"weights_symmetric_sign_True_per_ch_False_narrow_range_True_hf_range_True": {
"levels": 255,
"input_low": -1.994419813156128,
"input_high": 1.994419813156128,
"output_low": -1.994419813156128,
"output_high": 1.994419813156128
},
"weights_symmetric_sign_True_per_ch_False_narrow_range_True_hf_range_False": {
"levels": 255,
"input_low": -0.997209906578064,
"input_high": 0.997209906578064,
"output_low": -0.997209906578064,
"output_high": 0.997209906578064
},
"weights_symmetric_sign_True_per_ch_False_narrow_range_False_hf_range_True": {
"levels": 256,
"input_low": -2.0340540409088135,
"input_high": 2.002271890640259,
"input_high": 2.0022718596646167,
"output_low": -2.0340540409088135,
"output_high": 2.002271890640259
"output_high": 2.0022718596646167
},
"weights_symmetric_sign_True_per_ch_False_narrow_range_False_hf_range_False": {
"levels": 256,
Expand Down Expand Up @@ -242,20 +256,6 @@
]
]
},
"weights_symmetric_sign_True_per_ch_False_narrow_range_True_hf_range_True": {
"levels": 255,
"input_low": -1.994419813156128,
"input_high": 1.994419813156128,
"output_low": -1.994419813156128,
"output_high": 1.994419813156128
},
"weights_symmetric_sign_True_per_ch_False_narrow_range_True_hf_range_False": {
"levels": 255,
"input_low": -0.997209906578064,
"input_high": 0.997209906578064,
"output_low": -0.997209906578064,
"output_high": 0.997209906578064
},
"weights_asymmetric_sign_None_per_ch_False_narrow_range_True_hf_range_False": {
"levels": 255,
"input_low": 0.0,
Expand Down

0 comments on commit 403fb59

Please sign in to comment.