Files
openvino/tools/pot/tests/data/hardware_configs/reference/cpu_flatten.json
Liubov Talamanova bb00a9e664 [POT] Enable quantization inside subgraphs for CPU (#12776)
* Enable LSTMCell quantization

* Refactored unify function

* reverse dict

* Fix docs

* Add LSTM and GRU sequences

* Change scales to unified_scales in hw configs

* Fix inplace statistics

* Shift axis for subgraphs

* Changed HW config

* Update HW configs for tests

* Not quantize GRU ops with linear_before_reset: true

* Enable tests

* Support models with scalar input

* Fix tests

* return back submodules

* Fix tests

* Update GPU HW config

* Fix comments

* Fix axis
2022-11-12 07:54:29 +04:00

1 line
9.7 KiB
JSON

[{"target_device": "CPU"}, {"primary_bitwidth": 8, "input_priority_types": []}, {"type": "Convolution", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "DepthWiseConvolution", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "ConvolutionBackpropData", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "MatMul", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "Add", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "Multiply", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "Maximum", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "Less", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "LessEqual", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "Greater", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "GreaterEqual", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "Divide", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "Minimum", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "Equal", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "Subtract", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "NotEqual", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "FloorMod", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "LogicalOr", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "LogicalXor", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "LogicalAnd", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "LogicalNot", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}, {"bits": 8, "mode": "asymmetric", "granularity": "perchannel"}]}}, {"type": "Power", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}]}}, {"type": "AvgPool", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}]}}, {"type": "NormalizeL2", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}]}}, {"type": "ReduceMean", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}]}}, {"type": "MaxPool"}, {"type": "ReduceMax"}, {"type": "Interpolate", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}]}}, {"type": "MVN", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}]}}, {"type": "Concat", "attributes": {"unified_scales": "all"}}, {"type": "LSTMSequence", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}]}, "attributes": {"unified_scales": [[0, 1], [4, 5]]}}, {"type": "GRUSequence", "quantization": {"activations": [{"bits": 8, "mode": "symmetric", "granularity": "pertensor"}, {"bits": 8, "mode": "asymmetric", "granularity": "pertensor"}], "weights": [{"bits": 8, "mode": "symmetric", "level_low": -127, "level_high": 127, "granularity": "perchannel"}]}, "attributes": {"unified_scales": [[0, 1], [3, 4]]}}, {"type": "Reshape"}, {"type": "Flatten"}, {"type": "Squeeze"}, {"type": "Unsqueeze"}, {"type": "Split"}, {"type": "VariadicSplit"}, {"type": "Crop"}, {"type": "Transpose"}, {"type": "Tile"}, {"type": "StridedSlice"}, {"type": "ShuffleChannels"}, {"type": "Broadcast"}, {"type": "Pad"}, {"type": "ConvertLike"}, {"type": "Gather"}, {"type": "DepthToSpace"}]