-
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
[hexagon][testing] add TVMScript elemwise-add #11490
Conversation
Here's an example of the tabular output now produced:
|
Note: This PR starts to factor some benchmarking logic out of the individual benchmark functions, but it's very much a WIP. I'd like to safe a more thorough refactoring for if/when it's truly necessary. |
FYI I just force-pushed a fix, since probably nobody had a chance to review the PR yet. |
# ----------------------------------------------------------------------------------------------- | ||
|
||
# Hexagon v69 allows more dtypes, but we're sticking with v68 for now. | ||
for dtype in [ |
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.
nit:
These loops can be hoisted out into tvm.testing.parameters
, e.g.
class TestEWBenchmarks:
dtype = tvm.testing.parameter("int8")
num_vectors_per_tensor = tvm.testing.parameters([1, 16, 64, 512])
...
@tvm.testing.requires_hexagon
def test_elemwise_add_tvmcript(hexagon_session : HexagonLauncherRPC, dtype, num_vectors_per_tensor, ...):
In doing so, each testing option becomes a separate pytest. The benchmarking utilities could be defined in the class scope to capture the state across multiple tests.
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.
It's a good idea. If possible I'd like to tackle that in a future PR, once we have more benchmark configurations written.
looks like there are multiple benchmark files. I suggest to move them under |
dude, it's called TVMScript :-) |
UPDATE: Doesn't seem so. |
@csullivan : Just a heads-up, I just pushed a major reworking of the PR. |
Sample output from the current revision of the PR:
|
_HEXAGON_TARGET = tvm.target.hexagon("v69", link_params=True) | ||
|
||
_SUPER_TARGET = tvm.target.Target(_HEXAGON_TARGET, host=_HEXAGON_TARGET) |
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.
I'm looking for terminology suggestions here.
Replace TE-based elementwise-add benchmark with a TVMScript-based one. Update Hexagon target architecture from v68 to v69. As a result, the benchmark now requires a version of Hexagon SDK newer than 4.4.0.1. Version 4.5.0.3 is known to work.
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, thanks @cconvey!
Recreate the existing TE-based elementwise-add benchmark
in TVMScript.
The TE-based benchmark has several features not (yet)
present in the new TVMScript one:
mem_scope='global.vtcm'
Small refactoring of how these benchmarks use the
BenchmarkTable
class.cc @mehrdadh