Skip to content

[onnx2circle] Add option to list supported operators#16419

Closed
arkq wants to merge 1 commit intoSamsung:masterfrom
arkq:onnx2circle-list
Closed

[onnx2circle] Add option to list supported operators#16419
arkq wants to merge 1 commit intoSamsung:masterfrom
arkq:onnx2circle-list

Conversation

@arkq
Copy link
Copy Markdown
Contributor

@arkq arkq commented Mar 5, 2026

This commit adds --list-operators option to the onnx2circle tool which lists all supported ONNX operators with their opset numbers. Such list should help in ONNX model operators conversion in case when converted model uses not supported operators versions.

$ onnx2circle --list-operators
AveragePool-1
AveragePool-7
AveragePool-10
Conv-1
...
MaxPool-1
MaxPool-8
MaxPool-10
...
$ onnx2circle model.onnx model.circle
The following operators are not supported:
Conv-11
MaxPool-11
Resize-11

Copilot AI review requested due to automatic review settings March 5, 2026 08:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a --list-operators option to the onnx2circle tool that prints all supported ONNX operators with their opset versions. It also refactors the NodeConverterRegistry API to use a structured Operator type (a std::pair<std::string, unsigned int>) instead of separate name/opset parameters.

Changes:

  • Introduces NodeConverterRegistry::Operator type alias and updates lookup/registerConverter signatures accordingly
  • Adds getRegisteredOperators() and getSupportedOperators() functions to expose the list of supported ops
  • Adds --list-operators CLI option in onnx2circle.cpp

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
compiler/onnx2circle/src/onnx2circle.cpp Adds --list-operators argument handling and help text
compiler/mir/src/mir_onnx_importer/ONNXNodeConverterRegistry.h Introduces Operator type alias; updates method signatures
compiler/mir/src/mir_onnx_importer/ONNXNodeConverterRegistry.cpp Implements updated signatures and new getRegisteredOperators()
compiler/mir/src/mir_onnx_importer/ONNXOpRegistration.h Updates REG_CONVERTER macro to pass Operator struct
compiler/mir/src/mir_onnx_importer/ONNXImporterImpl.cpp Adds getSupportedOps() and public getSupportedOperators()
compiler/mir/include/mir_onnx_importer/ONNXImporterImpl.h Declares public getSupportedOperators()
compiler/mir/src/mir_onnx_importer/ONNXNodeConverterRegistry.test.cpp Updates tests to new API; adds registered_ops test
Comments suppressed due to low confidence (1)

compiler/mir/src/mir_onnx_importer/ONNXNodeConverterRegistry.test.cpp:28

  • Corrected spelling of 'Regsitry' to 'Registry'.
class NodeConverterRegsitryTest : public ::testing::Test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread compiler/mir/src/mir_onnx_importer/ONNXImporterImpl.cpp
Comment thread compiler/mir/src/mir_onnx_importer/ONNXNodeConverterRegistry.h Outdated
Comment thread compiler/mir/src/mir_onnx_importer/ONNXImporterImpl.cpp
@arkq arkq force-pushed the onnx2circle-list branch from 71943f9 to 77c4e43 Compare March 5, 2026 08:55
Comment thread compiler/mir/src/mir_onnx_importer/ONNXImporterImpl.cpp Outdated
Comment thread compiler/mir/src/mir_onnx_importer/ONNXImporterImpl.cpp Outdated
This commit adds --list-operators option to the onnx2circle tool which
lists all supported ONNX operators with their opset numbers. Such list
should help in ONNX model operators conversion in case when converted
model uses not supported operators versions.

> $ onnx2circle --list-operators
> AveragePool-1
> AveragePool-7
> AveragePool-10
> ...
> MatMul-1
> MatMul-9
> ...

ONE-DCO-1.0-Signed-off-by: Arkadiusz Bokowy <a.bokowy@samsung.com>
@arkq arkq force-pushed the onnx2circle-list branch from 77c4e43 to d231a94 Compare March 5, 2026 12:46
@arkq
Copy link
Copy Markdown
Contributor Author

arkq commented Mar 12, 2026

Closing this PR because the ‎compiler/onnx2circle module is deprecated.

@arkq arkq closed this Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants