-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[v1.x] ONNX support for broadcast_mod #19770
Conversation
Hey @Zha0q1 , Thanks for submitting the PR
CI supported jobs: [centos-gpu, clang, centos-cpu, edge, website, sanity, unix-cpu, unix-gpu, miscellaneous, windows-cpu, windows-gpu] Note: |
@@ -436,6 +436,17 @@ def test_onnx_export_contrib_AdaptiveAvgPooling2D(tmp_path, dtype): | |||
op_export_test('contrib_AdaptiveAvgPooling2D', M4, [x], tmp_path) | |||
|
|||
|
|||
@pytest.mark.parametrize('dtype', ['float16', 'float32', 'int32', 'int64']) | |||
@pytest.mark.parametrize('shapes', [((3, 3, 3), (3)), ((4, 5, 6, 7), (7))]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we also test rhs with higher dimension like (3, 3)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
…t into onnx_broadcast_mod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
MXNet broadcast mod's behavior is a mixture of np mod and fmod. So I made some adjustment in the onnx translation to make sure the behavior is the same as that of mxnet