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

[NumPy] add op random.laplace #17316

Merged
merged 31 commits into from
Mar 16, 2020
Merged

[NumPy] add op random.laplace #17316

merged 31 commits into from
Mar 16, 2020

Conversation

AntiZpvoh
Copy link
Contributor

@AntiZpvoh AntiZpvoh commented Jan 15, 2020

Description

Add op random.laplace, which could generate random samples with Laplace Distribution.

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 January 15, 2020 07:53

NNVM_REGISTER_OP(_npi_laplace)
.set_attr<FCompute>("FCompute<gpu>", NumpyLaplaceForward<gpu>);

This comment was marked as resolved.

@haojin2 haojin2 self-assigned this Jan 15, 2020
@haojin2 haojin2 added the Numpy label Jan 15, 2020
Copy link
Contributor

@xidulu xidulu left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@haojin2 haojin2 left a comment

Choose a reason for hiding this comment

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

LGTM, @hzfan Can you double check on the ffi part?

@xidulu
Copy link
Contributor

xidulu commented Mar 13, 2020

LGTM regarding the logic.

@haojin2 haojin2 merged commit ea2daba into apache:master Mar 16, 2020
MoisesHer pushed a commit to MoisesHer/incubator-mxnet that referenced this pull request Apr 10, 2020
* NumPy Laplace Distribution partly Frontend and Backend

Signed-off-by: AntiZpvoh <[email protected]>

* NumPy Laplace Distribution Backend style rectified

Signed-off-by: AntiZpvoh <[email protected]>

* NumPy Laplace Distribution Frontend modified

Signed-off-by: AntiZpvoh <[email protected]>

* Laplece op nightly test and normal op test correction

Signed-off-by: AntiZpvoh <[email protected]>

* NumPy Laplace Distribution unit test and code style

Signed-off-by: AntiZpvoh <[email protected]>

* Register uniform_n in CUDA

Signed-off-by: AntiZpvoh <[email protected]>

* Delete the registering of Laplace_n

Signed-off-by: AntiZpvoh <[email protected]>

* fix some alignment and indentation problems

Signed-off-by: AntiZpvoh <[email protected]>

* fix some sanity problems such as too long lines

* fix some sanity problems again

* laplace parmeters form change

* implement basic laplace function

* add frontend implement and ndarray loc case

* complete the frontend

* fix some sanity problems

* fix some sanity problems

* fix some typos

* fix some problems

* fix a typo

* add size==() condition handling

* fix some typos

* remove unused code

Co-authored-by: Ubuntu <[email protected]>
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request May 29, 2020
* NumPy Laplace Distribution partly Frontend and Backend

Signed-off-by: AntiZpvoh <[email protected]>

* NumPy Laplace Distribution Backend style rectified

Signed-off-by: AntiZpvoh <[email protected]>

* NumPy Laplace Distribution Frontend modified

Signed-off-by: AntiZpvoh <[email protected]>

* Laplece op nightly test and normal op test correction

Signed-off-by: AntiZpvoh <[email protected]>

* NumPy Laplace Distribution unit test and code style

Signed-off-by: AntiZpvoh <[email protected]>

* Register uniform_n in CUDA

Signed-off-by: AntiZpvoh <[email protected]>

* Delete the registering of Laplace_n

Signed-off-by: AntiZpvoh <[email protected]>

* fix some alignment and indentation problems

Signed-off-by: AntiZpvoh <[email protected]>

* fix some sanity problems such as too long lines

* fix some sanity problems again

* laplace parmeters form change

* implement basic laplace function

* add frontend implement and ndarray loc case

* complete the frontend

* fix some sanity problems

* fix some sanity problems

* fix some typos

* fix some problems

* fix a typo

* add size==() condition handling

* fix some typos

* remove unused code

Co-authored-by: Ubuntu <[email protected]>
sxjscience pushed a commit to sxjscience/mxnet that referenced this pull request Jul 1, 2020
* NumPy Laplace Distribution partly Frontend and Backend

Signed-off-by: AntiZpvoh <[email protected]>

* NumPy Laplace Distribution Backend style rectified

Signed-off-by: AntiZpvoh <[email protected]>

* NumPy Laplace Distribution Frontend modified

Signed-off-by: AntiZpvoh <[email protected]>

* Laplece op nightly test and normal op test correction

Signed-off-by: AntiZpvoh <[email protected]>

* NumPy Laplace Distribution unit test and code style

Signed-off-by: AntiZpvoh <[email protected]>

* Register uniform_n in CUDA

Signed-off-by: AntiZpvoh <[email protected]>

* Delete the registering of Laplace_n

Signed-off-by: AntiZpvoh <[email protected]>

* fix some alignment and indentation problems

Signed-off-by: AntiZpvoh <[email protected]>

* fix some sanity problems such as too long lines

* fix some sanity problems again

* laplace parmeters form change

* implement basic laplace function

* add frontend implement and ndarray loc case

* complete the frontend

* fix some sanity problems

* fix some sanity problems

* fix some typos

* fix some problems

* fix a typo

* add size==() condition handling

* fix some typos

* remove unused code

Co-authored-by: Ubuntu <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants