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

Add CustomOp tutorial doc #17241

Merged
merged 12 commits into from
Jan 29, 2020
Merged

Add CustomOp tutorial doc #17241

merged 12 commits into from
Jan 29, 2020

Conversation

rondogency
Copy link
Contributor

@rondogency rondogency commented Jan 7, 2020

Description

Add a brief tutorial doc on CustomOp tutorial and examples

This PR is not

  • Updating docs on the MXNet website on extending MXNet
  • Consolidating operator related docs on the website

Those will be addressed in the coming PRs

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

@rondogency
Copy link
Contributor Author

@samskalicky @mseth10 @wkcn please take a look at the doc

Copy link
Contributor

@samskalicky samskalicky left a comment

Choose a reason for hiding this comment

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

Good first draft!

example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
@rondogency
Copy link
Contributor Author

@samskalicky @wkcn resolved all the comments!

@rondogency
Copy link
Contributor Author

@eric-haibin-lin @aaronmarkham can you also take a quick look at the doc, thanks!

Copy link
Contributor

@samskalicky samskalicky left a comment

Choose a reason for hiding this comment

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

LGTM, great job @rondogency

Copy link
Member

@wkcn wkcn left a comment

Choose a reason for hiding this comment

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

Good job! LGTM : )

Copy link
Member

@eric-haibin-lin eric-haibin-lin left a comment

Choose a reason for hiding this comment

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

can we update the doc on website on extending mxnet with ops? https://mxnet.apache.org/api
We need to probably update https://mxnet.apache.org/api/faq/new_op with a new section for extending mxnet with an op without rebuilding mxnet.

@eric-haibin-lin
Copy link
Member

There are multiple docs on writing operators. Shall we consolidate them?

@rondogency
Copy link
Contributor Author

@eric-haibin-lin Thanks for the review! I will add it to a TODO list with upcoming features and consolidating all docs about writing operators (to give new users a smooth experience)

Copy link
Contributor

@aaronmarkham aaronmarkham left a comment

Choose a reason for hiding this comment

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

How do I go from running this basic example to consuming the following info for my own op? Maybe even a simple example of customization for a particular use case would help.

example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Show resolved Hide resolved
@rondogency
Copy link
Contributor Author

@mxnet-label-bot add [pr-awaiting-review]

@lanking520 lanking520 added the pr-awaiting-review PR is waiting for code review label Jan 23, 2020
Copy link
Contributor

@aaronmarkham aaronmarkham left a comment

Choose a reason for hiding this comment

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

Super minor suggestions, not worth another CI run. But, if you have to do it anyways, then please add these minor changes.

example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
example/extensions/lib_custom_op/README.md Outdated Show resolved Hide resolved
@rondogency
Copy link
Contributor Author

@aaronmarkham thanks for the approval! I resolved your comments since I have to add license header anyway.

@samskalicky
Copy link
Contributor

@mxnet-label-bot update [pr-awaiting-merge]

@lanking520 lanking520 added pr-awaiting-merge Review and CI is complete. Ready to Merge and removed pr-awaiting-review PR is waiting for code review labels Jan 29, 2020
@aaronmarkham aaronmarkham merged commit 821b6e5 into apache:master Jan 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-merge Review and CI is complete. Ready to Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants