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

New example of custom operator using RTC #9870

Merged
merged 3 commits into from
Feb 23, 2018

Conversation

asitstands
Copy link
Contributor

@asitstands asitstands commented Feb 23, 2018

Description

example/numpy-ops/ndarray_softmax.py contains a custom softmax implementation using RTC. However, it extends NDArrayOp which is deprecated. Moreover the example seems not compatible with the current RTC API. I think that the example confuses newbies like me who didn't know the previous history of the API changes. So I think it is a good idea to remove the broken example and add a new RTC example based on CustomOp. The new example example/numpy-ops/custom_softmax_rtc.py is based on the existing example (example/numpy-ops/custom_softmax.py) but uses custom CUDA kernels through RTC.

Checklist

Essentials

  • Passed code style checking (make lint)
  • 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
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • example/numpy-ops/ndarray_softmax.py is removed.
  • example/numpy-ops/custom_softmax_rtc.py is added.
  • example/numpy-ops/README.md is updated.

@piiswrong
Copy link
Contributor

great example. Thanks!

@piiswrong piiswrong merged commit b23e0a9 into apache:master Feb 23, 2018
dabraude pushed a commit to dabraude/incubator-mxnet that referenced this pull request Feb 24, 2018
* Example implementation of the softmax output layer using RTC

* Remove broken NDArrayOp example

* Update README.md of the python custom operator examples
dabraude pushed a commit to dabraude/incubator-mxnet that referenced this pull request Feb 24, 2018
* Example implementation of the softmax output layer using RTC

* Remove broken NDArrayOp example

* Update README.md of the python custom operator examples
@asitstands asitstands deleted the new-example branch February 25, 2018 10:35
rahul003 pushed a commit to rahul003/mxnet that referenced this pull request Jun 4, 2018
* Example implementation of the softmax output layer using RTC

* Remove broken NDArrayOp example

* Update README.md of the python custom operator examples
zheng-da pushed a commit to zheng-da/incubator-mxnet that referenced this pull request Jun 28, 2018
* Example implementation of the softmax output layer using RTC

* Remove broken NDArrayOp example

* Update README.md of the python custom operator examples
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants