Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

SSD INT8 ARMv8 Operator _sg_mkldnn_conv is not registered #15151

Closed
apivovarov opened this issue Jun 4, 2019 · 3 comments
Closed

SSD INT8 ARMv8 Operator _sg_mkldnn_conv is not registered #15151

apivovarov opened this issue Jun 4, 2019 · 3 comments
Labels
Quantization Issues/Feature Requests related to Quantization

Comments

@apivovarov
Copy link
Contributor

apivovarov commented Jun 4, 2019

I tried to use pre-trained GluonCV quantized SSD model ssd_512_mobilenet1.0_voc_int8 from model Zoo on ARMv8 (aarch64 Ubuntu 16.04).
Error:

Traceback (most recent call last):
  File "./run-gluoncv.py", line 11, in <module>
    net = model_zoo.get_model('ssd_512_mobilenet1.0_voc_int8', pretrained=True)
  File "/usr/local/lib/python3.5/dist-packages/gluoncv/model_zoo/model_zoo.py", line 231, in get_model
    net = _models[name](**kwargs)
  File "/usr/local/lib/python3.5/dist-packages/gluoncv/model_zoo/quantized/quantized.py", line 45, in func
    sym_net = SymbolBlock.imports(json_file, ['data'], None, ctx=ctx)
  File "/usr/local/lib/python3.5/dist-packages/mxnet/gluon/block.py", line 1018, in imports
    sym = symbol.load(symbol_file)
  File "/usr/local/lib/python3.5/dist-packages/mxnet/symbol/symbol.py", line 2728, in load
    check_call(_LIB.MXSymbolCreateFromFile(c_str(fname), ctypes.byref(handle)))
  File "/usr/local/lib/python3.5/dist-packages/mxnet/base.py", line 253, in check_call
    raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: Failed loading Op quantized_sg_mkldnn_conv_bn_relu_0 of type _sg_mkldnn_conv: [21:05:05] ../3rdparty/tvm/nnvm/src/core/op.cc:74: Check failed: op != nullptr: Operator _sg_mkldnn_conv is not registered
Stack trace:
  [bt] (0) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(nnvm::Op::Get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x328) [0xffffa069d5d0]
  [bt] (1) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(+0x232d29c) [0xffffa06e429c]
  [bt] (2) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(dmlc::JSONObjectReadHelper::ReadAllFields(dmlc::JSONReader*)+0xd0) [0xffffa06e8258]
  [bt] (3) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(+0x2329a48) [0xffffa06e0a48]
  [bt] (4) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(+0x232aa80) [0xffffa06e1a80]
  [bt] (5) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(std::_Function_handler<nnvm::Graph (nnvm::Graph), nnvm::Graph (*)(nnvm::Graph)>::_M_invoke(std::_Any_data const&, nnvm::Graph&&)+0xcc) [0xffff9ed2efbc]
  [bt] (6) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(nnvm::ApplyPasses(nnvm::Graph, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)+0x28c) [0xffffa06a0194]
  [bt] (7) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(mxnet::LoadLegacyJSONPass(nnvm::Graph)+0x44c) [0xffff9ed35294]
  [bt] (8) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(std::_Function_handler<nnvm::Graph (nnvm::Graph), nnvm::Graph (*)(nnvm::Graph)>::_M_invoke(std::_Any_data const&, nnvm::Graph&&)+0xcc) [0xffff9ed2efbc]

I built libmxnet.so on aarch64 Ubuntu 16.04.6 without MKL support
incubator-mxnet version 134a3e8 (Jun 4):

cmake -GNinja \
    -DUSE_CUDA=OFF \
    -DUSE_MKL_IF_AVAILABLE=OFF \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \
    -DCMAKE_C_COMPILER_LAUNCHER=ccache \
    -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
    ..

ninja -j16

GluonCV installed using pip3 (gluoncv-0.4.0.post0-py2.py3-none-any.whl)

sudo pip3 install gluoncv
Collecting gluoncv
  Using cached https://files.pythonhosted.org/packages/3d/31/9c02604787d852bd0356ff0b5d727f7c94c9ff524cc8267245ece8d5c4a5/gluoncv-0.4.0.post0-py2.py3-none-any.whl

Related GluonCV issue: dmlc/gluon-cv#793

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.

@ZhennanQin
Copy link
Contributor

Gluon pre-trained int8 model requires mkldnn library and AVX512 instruction sets. MXNet and Gluon doesn't provide int8 solution on ARM backend at moment.

@pengzhao-intel pengzhao-intel added Quantization Issues/Feature Requests related to Quantization Question labels Jun 5, 2019
@pengzhao-intel
Copy link
Contributor

closing since the question is answered.
Feel free to reopen if anything is not clear :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Quantization Issues/Feature Requests related to Quantization
Projects
None yet
Development

No branches or pull requests

4 participants