-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add some toolchain benchmarks to test_benchmark.py #26304
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
Merged
+69
−18
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can we not add these to the normal toplevel list of benchmarkers? That is, we have a "primes" benchmark, and we could have a "hello world" benchmark. And there could be a Benchmarker that just compiles in emcc or clang and doesn't run. That could run on all the benchmarks in principle.
Then, picking the right Benchmarkers using the env var, and the right benchmarks using
benchmark.test_*, you can get the results you want iiuc?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 lot of the existing benchmarks would not work with these benchmarkers I fear since they anything in the
buildphase and instead run the compiler in therunphase (which doesn't have any of the build arguments such asfilename, shared_args, emcc_args, native_args, native_exec, lib_builder.For very simple cases it does work to just do the compiling during
run. So I added these new benchmarkers to the named list so folks can try them.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.
Yeah, a lot of other benchmarks might not work - but that's fine I think as users can pick which they want?
Now that we have lines 398-399, do we need 559-562? That is, can't we run these benchmarks the normal way? I am just trying to avoid adding a second "harness" that iterates over benchmarks, that handles using the first benchmarker as the baseline (568-571), etc.
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 tried to re-use do_bennchmark for these, but its different enough I think it warrants keeping this simple/separate do_toolchain_benchmark.
For example, with the toolchain benchmark there is no "src" or "name" to pass.
Maybe we can find a way to merge them later, but this seems OK for now.
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.
Hmm, I'd hope we can make
src, nameoptional somehow, but I guess this new function is not a huge amount of code, so I won't object strongly.