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

Fix and optimize handling of vectorized memory accesses (#17767) #18095

Merged
merged 1 commit into from
Apr 18, 2020

Conversation

ptrendx
Copy link
Member

@ptrendx ptrendx commented Apr 18, 2020

  • Vectorized loads for binary elemwise kernel

  • More generalization

  • Add backwardusenone

  • Remove the unused _backward_add op

  • Add vectorized backwardusein

  • Extending vectorization to more binary ops, binary ops with scalar and
    unary ops

  • Handling ElementwiseSum

  • Get rid of half2 in mshadow

  • Remove backward_elemwiseaddex

  • Revert "Remove the unused _backward_add op"

This reverts commit f86da86.

  • Revert "Remove backward_elemwiseaddex"

This reverts commit 7729114.

  • Add back the backward_add since C++ test relies on it

  • Test bcast implementations

  • First version of vecotrized bcast

  • Adding single side vectorized bcast kernel

  • Removing debug prints

  • Actually run the single side kernel

  • Move the default implementation of bcast to the vectorized one

  • Limit the new implementation to GPU only

  • Enabling vectorization when broadcast does not actually do broadcast

  • Cleaning

  • Cleaning part 2

  • Fix for numpy ops using stuff from broadcast

  • Fix

  • Fix lint

  • Try to debug pinv numpy test

  • Fix

  • Fix the vectorized broadcast implementation for misaligned input
    pointers

  • Added tests

  • Added docs to cuda_vectorization.cuh

  • Another fix for broadcast and fix INT64 compilation

  • Optimize for aligned=true

  • 1 more addition to test

  • Reverting the change to Numpy op test

  • Trying mcmodel=medium to fix the failure in CMake static build

  • Revert "Trying mcmodel=medium to fix the failure in CMake static build"

This reverts commit 1af684c.

  • Limiting the PR to just elementwise ops

Description

Cherry pick #17767 to v1.x branch. @ciyongch

@ptrendx ptrendx added the v1.x Targeting v1.x branch label Apr 18, 2020
@mxnet-bot
Copy link

Hey @ptrendx , 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-gpu, unix-cpu, website, edge, centos-cpu, miscellaneous, sanity, unix-gpu, clang, windows-gpu, windows-cpu]


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.

@DickJC123 DickJC123 assigned DickJC123 and unassigned DickJC123 Apr 18, 2020
@DickJC123 DickJC123 self-requested a review April 18, 2020 02:01
Copy link
Contributor

@DickJC123 DickJC123 left a comment

Choose a reason for hiding this comment

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

LGTM for inclusion in 1.7

* Vectorized loads for binary elemwise kernel

* More generalization

* Add backwardusenone

* Remove the unused _backward_add op

* Add vectorized backwardusein

* Extending vectorization to more binary ops, binary ops with scalar and
unary ops

* Handling ElementwiseSum

* Get rid of half2 in mshadow

* Remove backward_elemwiseaddex

* Revert "Remove the unused _backward_add op"

This reverts commit f86da86.

* Revert "Remove backward_elemwiseaddex"

This reverts commit 7729114.

* Add back the backward_add since C++ test relies on it

* Test bcast implementations

* First version of vecotrized bcast

* Adding single side vectorized bcast kernel

* Removing debug prints

* Actually run the single side kernel

* Move the default implementation of bcast to the vectorized one

* Limit the new implementation to GPU only

* Enabling vectorization when broadcast does not actually do broadcast

* Cleaning

* Cleaning part 2

* Fix for numpy ops using stuff from broadcast

* Fix

* Fix lint

* Try to debug pinv numpy test

* Fix

* Fix the vectorized broadcast implementation for misaligned input
pointers

* Added tests

* Added docs to cuda_vectorization.cuh

* Another fix for broadcast and fix INT64 compilation

* Optimize for aligned=true

* 1 more addition to test

* Reverting the change to Numpy op test

* Trying mcmodel=medium to fix the failure in CMake static build

* Revert "Trying mcmodel=medium to fix the failure in CMake static build"

This reverts commit 1af684c.

* Limiting the PR to just elementwise ops
@ciyongch
Copy link
Contributor

Adding this PR to 1.7.0 roadmap #16864.

@ptrendx
Copy link
Member Author

ptrendx commented Apr 18, 2020

@mxnet-bot run ci [windows-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [windows-gpu]

@ptrendx ptrendx merged commit b8e8d73 into apache:v1.x Apr 18, 2020
@ptrendx
Copy link
Member Author

ptrendx commented Apr 18, 2020

@ciyongch This PR is now merged to v1.x branch, please cherry pick it to v1.7.

@ciyongch
Copy link
Contributor

@ptrendx as the v1.7.x is already rebased, could you please submit it to v1.7.x, then we can get it merged once the CI pass? Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
v1.x Targeting v1.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants