Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[FEATURE] add oneDNN support for numpy transpose #20419

Merged
merged 28 commits into from
Nov 10, 2021

Conversation

RafLit
Copy link
Contributor

@RafLit RafLit commented Jul 5, 2021

Description

  • numpy and ndarray transpose now both use onednn reorder primitive

Transpose operator benchmark results with onednn

This PR Master
tensor shape numpy [ms] ndarray [ms] numpy [ms] ndarray [ms]
(128, 128) 0.5742 0.5906 0.5274 0.5942
(2048, 2048) 1.3554 1.3458 1.7525 1.3128
(4096, 4096) 4.6793 4.6705 6.0797 4.6172
(2048,8192) 4.397 4.4318 6.0283 4.3277
(256, 65536) 4.1176 4.1757 6.0236 4.1361
(16, 1048576) 3.7967 3.8144 4.6723 3.77
(256, 256, 256) 4.0402 3.9367 118.3312 3.9208
(64, 512, 512) 4.1 4.1263 118.143 4.1153
(64, 64, 64, 64) 4.1867 4.2186 137.0017 4.1942
(16, 16, 256, 256) 9.4766 9.5056 140.2853 9.5924

Checklist

Essentials

  • PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

@mxnet-bot
Copy link

Hey @RafLit , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [centos-cpu, edge, centos-gpu, windows-gpu, unix-cpu, miscellaneous, unix-gpu, windows-cpu, sanity, website, clang]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@mseth10 mseth10 added the pr-awaiting-testing PR is reviewed and waiting CI build and test label Jul 5, 2021
@RafLit RafLit changed the title [FEATURE] np transpose to nd implementation [FEATURE] add oneDNN support for numpy transpose Jul 5, 2021
@mseth10 mseth10 added pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test and removed pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress labels Jul 5, 2021
@RafLit RafLit requested a review from szha as a code owner July 5, 2021 15:58
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jul 5, 2021
@mozga-intel
Copy link
Contributor

mozga-intel commented Jul 7, 2021

@RafLit For non-square matrices, the algorithm is more complicated (in-place). Could you tell me whether you have any results for a non-square matrix?

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test and removed pr-awaiting-review PR is waiting for code review labels Jul 8, 2021
@RafLit
Copy link
Contributor Author

RafLit commented Jul 8, 2021

@RafLit For non-square matrices, the algorithm is more complicated (in-place). Could you tell me whether you have any results for a non-square matrix?

@anko-intel I updated the table and added some data for non-square matrices

@mseth10 mseth10 added pr-awaiting-review PR is waiting for code review pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review labels Jul 8, 2021
@RafLit
Copy link
Contributor Author

RafLit commented Jul 8, 2021

@mxnet-bot run ci [centos-cpu, windows-cpu]

@RafLit
Copy link
Contributor Author

RafLit commented Nov 8, 2021

@mxnet-bot run ci [unix-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [unix-gpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Nov 8, 2021
@RafLit
Copy link
Contributor Author

RafLit commented Nov 9, 2021

@mxnet-bot run ci [centos-cpu, unix-cpu, unix-gpu, windows-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [unix-cpu, unix-gpu, centos-cpu, windows-gpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Nov 9, 2021
@RafLit
Copy link
Contributor Author

RafLit commented Nov 9, 2021

@mxnet-bot run ci [centos-cpu, unix-cpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [centos-cpu, unix-cpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Nov 9, 2021
@RafLit
Copy link
Contributor Author

RafLit commented Nov 9, 2021

@mxnet-bot run ci [unix-cpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [unix-cpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Nov 9, 2021
Copy link
Contributor

@bgawrych bgawrych left a comment

Choose a reason for hiding this comment

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

LGTM

@RafLit
Copy link
Contributor Author

RafLit commented Nov 9, 2021

@szha Could you please review the changes and merge if it's ok?

@szha
Copy link
Member

szha commented Nov 10, 2021

@bgawrych should be able to help with the merge.

@bgawrych bgawrych merged commit 16fed6e into apache:master Nov 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants