[POT] Return Mul to ignored ops for transformers (except CPU_SPR) (#16407)
This commit is contained in:
parent
24ff43aa5b
commit
d402b6ed3e
@ -178,7 +178,7 @@ def insert_fake_quantize_nodes(config, model, qscheme=None):
|
||||
ignored_params.update(deepcopy(config['ignored']))
|
||||
|
||||
if config['model_type']:
|
||||
ignored_params['operations'] += get_ignored_operations(config['model_type'])
|
||||
ignored_params['operations'] += get_ignored_operations(config['model_type'], config['target_device'])
|
||||
|
||||
if qscheme:
|
||||
for key in qscheme:
|
||||
|
@ -321,9 +321,11 @@ def get_input_shape_for_bias(activations_statistics, input_node_name):
|
||||
return input_shape
|
||||
|
||||
|
||||
def get_ignored_operations(model):
|
||||
def get_ignored_operations(model_type, target_device):
|
||||
operation = {"transformer": [{"type": "Add"}, {"type": "Power"},
|
||||
{"type": "Squeeze"},
|
||||
{"type": "Subtract"}, {"type": "ReduceMean"},
|
||||
{"type": "SquaredDifference"}, {"type": "MVN"}]}
|
||||
return operation[model]
|
||||
if target_device != 'CPU_SPR':
|
||||
operation['transformer'].append({"type": "Multiply"})
|
||||
return operation[model_type]
|
||||
|
Loading…
Reference in New Issue
Block a user