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

[Numpy] FFI: random.shuffle, equal, not_equal, less_equal, greater_equal, less, maximum and minimum #17896

Merged
merged 5 commits into from
Apr 18, 2020

Conversation

AntiZpvoh
Copy link
Contributor

Description

Add FFI support of

  • random.shuffle

  • equal, not_equal, less_equal, greater_equal, less

  • maximum, minimum

  Old FFI (ctypes) (us) New FFI (cython) (us)
random.shuffle 16.7 4.74
equal 26.41 9.65
not_equal 25.88 9.22
less_equal 25.9 9.23
greater_equal 61.6 29.95
less 26.03 9.27
maximum 24.61 8.17
minimum 24.5 8.02

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@AntiZpvoh AntiZpvoh requested a review from szha as a code owner March 24, 2020 06:31
@mxnet-bot
Copy link

Hey @AntiZpvoh , Thanks for submitting the PR
Once your PR is ready for CI checks, invoke 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, windows-gpu, unix-gpu, centos-cpu, unix-cpu, website, edge, miscellaneous, sanity, clang, 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.

@haojin2 haojin2 added this to In progress in numpy via automation Mar 24, 2020
@haojin2 haojin2 added the Numpy label Mar 24, 2020
@hzfan
Copy link
Contributor

hzfan commented Mar 30, 2020

LGTM

@AntiZpvoh
Copy link
Contributor Author

@mxnet-bot run ci [windows-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [windows-gpu]

@haojin2
Copy link
Contributor

haojin2 commented Apr 17, 2020

@mxnet-bot run ci [unix-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [unix-gpu]

@haojin2 haojin2 merged commit dcada9b into apache:master Apr 18, 2020
numpy automation moved this from In progress to Done Apr 18, 2020
AntiZpvoh added a commit to AntiZpvoh/incubator-mxnet that referenced this pull request Jul 6, 2020
…ual, less, maximum and minimum (apache#17896)

* add random.shuffle, equal, not_equal, less_equal, greater_equal, less, maximum and minimum ffi and benchmark

* fix the implementation of binary ops

* fix some code logic issues (non-commutative)

Co-authored-by: Hao Jin <hjjn.amzn@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects
numpy
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants