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

[TUTORIAL] Gluon performance tips and tricks #15427

Merged
merged 8 commits into from
Jul 3, 2019

Conversation

thomelane
Copy link
Contributor

Summary of performance features provided in MXNet that are relevant for Gluon users. Useful for a beginner audience who might not know what features to search for in the first place.

Description

(Brief description on what this PR is about)

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 http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best 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

…r of performance features provided in MXNet. Useful for beginner audience.
@thomelane thomelane requested a review from szha as a code owner July 2, 2019 02:16
@thomelane
Copy link
Contributor Author

@aaronmarkham would be great if you could review this new tutorial too, cheers! i'll make adjustments to my sparse tutorial tomorrow.

@pengzhao-intel
Copy link
Contributor

pengzhao-intel commented Jul 2, 2019

It's great to have these documents. I think we still need to cover CPU performance.
@xinyu-intel will help to provide additional information about CPU

@thomelane
Copy link
Contributor Author

Would be great to get CPU specific tricks and tips @pengzhao-intel. Given the length of this tutorial already let's add those in another tutorial as a follow up. @xinyu-intel are you able to write about some performance tricks for CPU and follow up in another PR? When we have that we can think about splitting this up into generic tips, GPU specific and CPU specific tricks.

@pengzhao-intel
Copy link
Contributor

Would be great to get CPU specific tricks and tips @pengzhao-intel. Given the length of this tutorial already let's add those in another tutorial as a follow up. @xinyu-intel are you able to write about some performance tricks for CPU and follow up in another PR? When we have that we can think about splitting this up into generic tips, GPU specific and CPU specific tricks.

Agree. I see lots of tips and tricks are common for both CPU and GPU; so we can make the user aware of this :)

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.

Couple of minor things... otherwise looks good.

docs/tutorials/gluon/performance.md Outdated Show resolved Hide resolved
docs/tutorials/gluon/performance.md Outdated Show resolved Hide resolved
docs/tutorials/gluon/performance.md Outdated Show resolved Hide resolved
@aaronmarkham
Copy link
Contributor

I restarted the failed CI test for you.

@thomelane
Copy link
Contributor Author

thanks for all the reviews @aaronmarkham @pengzhao-intel @ptrendx. updates have been made.

Copy link
Contributor

@pengzhao-intel pengzhao-intel left a comment

Choose a reason for hiding this comment

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

docs/tutorials/index.md Outdated Show resolved Hide resolved
Copy link
Contributor

@pengzhao-intel pengzhao-intel left a comment

Choose a reason for hiding this comment

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

It's a nice tutorial. Add minor comments.

After going through these approaches, how people know that they have already got a good performance?

docs/tutorials/gluon/performance.md Show resolved Hide resolved
docs/tutorials/gluon/performance.md Outdated Show resolved Hide resolved
docs/tutorials/gluon/performance.md Outdated Show resolved Hide resolved
@thomelane
Copy link
Contributor Author

@pengzhao-intel thanks for the follow-up. made the changes.

Copy link
Contributor

@pengzhao-intel pengzhao-intel left a comment

Choose a reason for hiding this comment

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

Thanks for the nice document.

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.

Great Work! Thank you : )

@aaronmarkham aaronmarkham merged commit 3df3e2c into apache:master Jul 3, 2019
@braindotai
Copy link

Marvellous work by @thomelane, hands down.
Thanks a gazillion times.

@braindotai
Copy link

A good tutorial on how to convert a Gluon model to Module and vice-versa would be great. I've seen many issues and confusions on Github and MXNet-Forum regarding it. Thanks

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.

6 participants