-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[FEATURE] Add oneDNN support for npx.reshape and np.reshape #20563
Conversation
Hey @agrabows , Thanks for submitting the PR
CI supported jobs: [centos-gpu, sanity, windows-cpu, edge, windows-gpu, centos-cpu, unix-gpu, clang, unix-cpu, website, miscellaneous] Note: |
@mxnet-bot run ci [windows-gpu] |
Jenkins CI successfully triggered : [windows-gpu] |
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-bot run ci [edge] |
Jenkins CI successfully triggered : [edge] |
@mxnet-bot run ci [unix-cpu] |
Jenkins CI successfully triggered : [unix-cpu] |
dc3c2e9
to
6cfdf0d
Compare
@mxnet-bot run ci [unix-cpu] |
Jenkins CI successfully triggered : [unix-cpu] |
@mxnet-bot run ci [centos-cpu] |
Jenkins CI successfully triggered : [centos-cpu] |
@mxnet-bot run ci [centos-gpu] |
Jenkins CI successfully triggered : [centos-gpu] |
@mxnet-bot run ci [centos-gpu] |
Jenkins CI successfully triggered : [centos-gpu] |
Description
Function reshape() from modules mxnet.numpy and mxnet.numpy_extension will now be executed by oneDNN primitives as it is done in module mxnet.ndarray.
Checklist
Essentials
Changes
Comments
Using two NNVM_REGISTER_OP() functions (one for mxnet.ndarray, second for mxnet.numpy/mxnet.numpy_extension) instead of one with .add_alias() because special values in npx.reshape's and nd.reshape's new_shape/target_shape parameters have different functionality. For example:
in nd.reshape():
in npx.reshape():
Performance comparison:
![image](https://user-images.githubusercontent.com/59651240/131477550-9f604e00-48d2-463e-a829-4d4d0b017381.png)