Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get list of unsupported ONNX operators #2995

Merged
merged 2 commits into from
May 16, 2019

Conversation

markrogersjr
Copy link
Contributor

Improve user experience by reporting the entire list of ops that are not supported in ONNX. @JennyChou5 @yidawang @zhreshold @srkreddy1238 @kazum

Copy link

@JennyChou5 JennyChou5 left a comment

Choose a reason for hiding this comment

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

traversing graph while reporting missing operator lists is good for users.
suggest checking op_name in identity_list or op_name in convert_map or op_name = 'Constant' instead of creating another supported_op set.

@@ -879,6 +879,79 @@ def _get_convert_map(opset):
'Shape': Shape.get_converter(opset),
}

supported_ops = set([

Choose a reason for hiding this comment

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

I am thinking defining the supported_ops set is redundant.
checking op_name in identity_list or op_name in convert_map or op_name = 'Constant' should be enough

unsupported_ops = []
for node in graph.node:
op_name = node.op_type
if op_name not in supported_ops:

Choose a reason for hiding this comment

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

checking op_name in identity_list or op_name in convert_map or op_name = 'Constant' should be enough

@@ -775,6 +775,80 @@ def _get_convert_map(opset):
}


supported_ops = set([

Choose a reason for hiding this comment

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

I am thinking defining the supported_ops set is redundant.
checking op_name in identity_list or op_name in convert_map or op_name = 'Constant' should be enough

unsupported_ops = []
for node in graph.node:
op_name = node.op_type
if op_name not in supported_ops:

Choose a reason for hiding this comment

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

checking op_name in identity_list or op_name in convert_map or op_name = 'Constant' should be enough

@icemelon icemelon added the status: need update need update based on feedbacks label Apr 15, 2019
@tqchen
Copy link
Member

tqchen commented Apr 20, 2019

@KoinFlyp please act on @JennyChou5 's comment

@markrogersjr markrogersjr force-pushed the onnx_missing_ops branch 2 times, most recently from 5c6a913 to 3d5f193 Compare April 20, 2019 19:21
@tqchen
Copy link
Member

tqchen commented Apr 20, 2019

Copy link

@JennyChou5 JennyChou5 left a comment

Choose a reason for hiding this comment

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

even though currently _identity_list is empty but it would be good to make logic complete.

unsupported_ops = set()
for node in graph.node:
op_name = node.op_type
if op_name not in convert_map and op_name != 'Constant':

Choose a reason for hiding this comment

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

should we check the _identity_list? even though currently it is empty but it would be good to make logic complete.

unsupported_ops = set()
for node in graph.node:
op_name = node.op_type
if op_name not in convert_map and op_name != 'Constant':

Choose a reason for hiding this comment

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

should we check the _identity_list? even though currently it is empty but it would be good to make logic complete.

@markrogersjr markrogersjr force-pushed the onnx_missing_ops branch 2 times, most recently from 8b4be42 to 6761072 Compare April 22, 2019 19:36
Copy link

@JennyChou5 JennyChou5 left a comment

Choose a reason for hiding this comment

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

logical good and correct.

unsupported_ops.add(op_name)
if unsupported_ops:
msg = ['The following operators are not supported for frontend ONNX: ']
for i, op_name in enumerate(unsupported_ops):
Copy link
Member

Choose a reason for hiding this comment

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

how about ops = ', '.join(str(op) for op in unsupported_ops)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We’d still have to concatenate the ‘The following ops...’ string and I generally avoid concatenating strings with +. Your way is neater, though, so I’ll change it.

@tqchen tqchen merged commit 76ae2dc into apache:master May 16, 2019
@tqchen tqchen added status: accepted and removed status: need update need update based on feedbacks labels May 16, 2019
@tqchen
Copy link
Member

tqchen commented May 16, 2019

Thanks, @yongwww @JennyChou5 @KoinFlyp this is now merged

wweic pushed a commit to wweic/tvm that referenced this pull request Jun 26, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants