I created int8 ir files for my custom network using calibration tool.
When i tried loading my model(with int8 ir files) with plugin, i got error like:
"exec_net = ie.load_network(network=net, device_name="CPU")
File "ie_api.pyx", line 85, in openvino.inference_engine.ie_api.IECore.load_network
File "ie_api.pyx", line 92, in openvino.inference_engine.ie_api.IECore.load_network
RuntimeError: Primitive descriptor was not found for node 49"
So i debuged further and found that linear layer(fc layer) is the issue. I replaced fc layer with 1x1 conv and I was able to load plugin with my model.
Maybe linear layer support with int8 quantization is not there or if am wrong, please correct me.
Actually you were right. Fully connected is supported on AVX-512 only.
Can you help me with one more thing. I faced issue in 3D Convolution with int8 support. Error i got is like: "RuntimeError: std::exception".
I used simple 3D convolution network with only 3D convolution and relu layers. Quantized to int8 using calibration, then while loading plugin into model i got this error.
Can you confirm whether 3D convolution support is there or not.
Can you help me with one more thing. Can you confirm whether any 3D operations (3D batchnorm, 3D maxpool etc) is supported with int8 quantization while loading int8 quantized model with plugins.
Perhaps you've seen the 8-bit Integer Inference Engine doc ? So if your 3D layer is one of these below, then it shouldn't be an issue. There is nothing inherent to the INT8 quantization process that should break with 3D layers. But batchnorm and maxpool are not supported by OpenVino INT8 at all, as you can see below. If those layers are encountered during the quantization process, they will fall back to FP32. Now there's a key thing called "validation". OpenVino INT8 may not have been fully validated on 3D layers. But if the layer is supported, then it should work. If it doesn't, it's a bug which should be filed.
FullyConnected (AVX-512 only)
Hope it helps,
Actually i carried out a little experiment. I created a small network with two 3D convolution layers and two Relu layers. I will share int8 ir files with you.
When i tried loading plugin to network i got this error; i will give snipet of code also down below:
net = IENetwork(model=model_xml, weights=model_bin)
exec_net = plugin.load(network=net)
ERROR: File "ie_api.pyx", line 551, in openvino.inference_engine.ie_api.IEPlugin.load
File "ie_api.pyx", line 561, in openvino.inference_engine.ie_api.IEPlugin.load
You can also execute from your side using these ir files. I think its a bug.
I am raising this concern because my custom network uses 3D convolution and other 3D operations.
Thanking you for your concern in this matter.
It may very well be a bug. thanks for your attached files which reproduce the issue ! I will certainly take a look and file a bug on your behalf if I can reproduce it also.
3D INT8 models don't work because they're not supported. But this should be explicitly stated in the documentation and it's not. So it's still a bug but for now, a documentation bug.
Thanks for your patience !