Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TVMC] Add an end_to_end benchmarking argument when benchmarking. #10256

Merged
merged 5 commits into from
Feb 17, 2022

Conversation

jwfromm
Copy link
Contributor

@jwfromm jwfromm commented Feb 15, 2022

This is an extension to PR #10226 by @tmoreau89. It makes end to end benchmarking an option to tvmc.run and defaults it to False. This provides an easy way to measure memory copies without changing the default behavior of TVMC. Please take a look @leandron @tmoreau89.

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

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

Thanks Josh! I closed my PR; I left a comment on measuring the copying overheads from the CPU device rather than target to target transfer (e.g. GPU to GPU)

# Optionally measure e2e data transfers from the
# CPU to device memory overheads (e.g. PCIE
# overheads if the device is a discrete GPU).
times = module.benchmark(dev, number=number, repeat=repeat, end_to_end=end_to_end)
Copy link
Contributor

Choose a reason for hiding this comment

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

we should use session.cpu() instead of dev since we need to include copy overheads from CPU memory to e.g. GPU memory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for noting that, I added an if that sets dev to cpu if end_to_end is on.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great thank you!

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

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

LGTM

@masahi masahi merged commit f983769 into apache:main Feb 17, 2022
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
…ache#10256)

* Add an end_to_end benchmarking argument to TVMC run.

* Add command line test.

* Fix comment syntax.

* Set device to cpu if end_to_end is on.

* Tickle CI
@jwfromm jwfromm deleted the tvmc_end2end branch April 12, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants