-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…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
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.