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

Cleaned up profiling tutorial #15228

Merged
merged 4 commits into from
Jun 13, 2019
Merged

Conversation

thomelane
Copy link
Contributor

Description

Changed wording of a few parts of the tutorial.
Added more description around NVidia Profiling tools (for beginners).
Moved images to web-data (and now link there).

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

@thomelane thomelane requested a review from szha as a code owner June 12, 2019 23:06
From the output above, it seems as if printing the output takes lot more time that multiplying two large matrices. That doesn't feel right.

This is because, in MXNet, all operations are executed asynchronously. So, when `nd.dot(x, x)` returns, the matrix multiplication is not complete, it has only been queued for execution. `asnumpy` in `print(y.asnumpy())` however, waits for the result to be computed and hence takes longer time.
This is because, in MXNet, all operations are executed asynchronously. So, when `nd.dot(x, x)` returns, the matrix multiplication is not complete, it has only been queued for execution. `asnumpy` however, waits for the result to be computed and hence takes longer time. Other examples of 'blocking' operations include `asscalar` and `wait_to_read`.
Copy link
Contributor

Choose a reason for hiding this comment

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

asnumpy however, has to wait for the result to be actually computed in order to be able to convert it to a numpy array on CPU, hence taking a longer time.

or something like that. To express that it doesn't just wait for no reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great point. added.

Copy link
Contributor

@ThomasDelteil ThomasDelteil left a comment

Choose a reason for hiding this comment

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

👍

@vandanavk
Copy link
Contributor

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

@marcoabreu marcoabreu added Doc pr-awaiting-review PR is waiting for code review labels Jun 12, 2019
docs/tutorials/python/profiler.md Outdated Show resolved Hide resolved
docs/tutorials/python/profiler.md Outdated Show resolved Hide resolved
docs/tutorials/python/profiler.md Outdated Show resolved Hide resolved
docs/tutorials/python/profiler.md Outdated Show resolved Hide resolved
docs/tutorials/python/profiler.md Outdated Show resolved Hide resolved
@thomelane
Copy link
Contributor Author

thanks for the review @vishaalkapoor!

@vishaalkapoor
Copy link
Contributor

LGTM!

@ThomasDelteil ThomasDelteil merged commit b8b352d into apache:master Jun 13, 2019
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
* Cleaned up profiling tutorial.

* Minor edits to profiler tutorial.

* fix ascii issue

* Updates based on feedback.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Doc pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants