glow: [ONNXModelLoader] Support for LogSoftmax operator is missing

Tried compiling a ONNX model containing LogSoftmax operator and the compiler is failing with this error:

Error code: MODEL_LOADER_UNSUPPORTED_OPERATOR
Error message: Failed to load operator LogSoftmax .
Error return stack:
/workspaces/pytorch-glow/glow/lib/Importer/ONNXModelLoader.cpp:3745
/workspaces/pytorch-glow/glow/lib/Importer/ONNXModelLoader.cpp:3820
/workspaces/pytorch-glow/glow/lib/Importer/ONNXModelLoader.cpp:3949
/workspaces/pytorch-glow/glow/lib/Importer/ONNXModelLoader.cpp:3963
*** Check failure stack trace: ***

The glow version is at: ‘’’ commit e19f525b6e1bc91e04b79b55a80d7ed786faad7f Date: Thu Apr 2 18:21:35 2020 -0700 ‘’’

Running the following command line:

./build/bin/model-compiler -model=./mymodel.onnx -emit-bundle=./output -backend=CPU

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@muhdmud You can find some general guidelines here. The main steps would be in this case:

  1. You should define a new node LogSoftmax and define a lowering logic here to decompose it into Log + Softmax which are already supported by Glow.
  2. Add logic in ONNXModelLoader to load a LogSoftmax node based on the proto description.
  3. Add some unit tests in OnnxImporterTest

Hi all, any updates on this? would like to help out

@jfix71 I really wish but I am new to C++, so it would take me longer to get started. Otherwise I am happy to contribute.