forked from gpgpu-sim/gpgpu-sim_distribution
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Suggested perf improvements #36
Open
CoffeeBeforeArch
wants to merge
8
commits into
purdue-aalp:dev
Choose a base branch
from
CoffeeBeforeArch:suggeted_perf_improvement
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Suggested perf improvements #36
CoffeeBeforeArch
wants to merge
8
commits into
purdue-aalp:dev
from
CoffeeBeforeArch:suggeted_perf_improvement
Conversation
This file contains 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
tgrogers
requested changes
Apr 5, 2020
Interestingly enough, -DNDEBUG removes the asserts, but the compiler still isn't smart enough to remove the call to the |
Some perf results for longer running apps:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
GPGPU-Sim contains many asserts (and conditional checks) that are primarily used for debugging. As these checks never fail for most (if not all simulations run today), I propose a third mode of compilation be added to GPGPU-Sim (one that focuses on the speed of the simulation when benchmarks already pass).
Let's consider a brief hotspot analysis of the code from Linux perf tools from running some matrix multiplication code:
13.27% of the time is spent updating cache stats (this breakdown is consistent for tests running from 1 second to 10 minutes, and likely fully scaled sims). This is partially the result of branch-heavy code generated by:
Where
check_fail_valid
andcheck_valid
both contain additional branches.Ignoring the fact that accesses to
m_stats
andm_fail_stats
miss ~100% of the time, just removing the unnecessary branches resulted in a 5-15% speedup.Perhaps it makes sense to have a
performance
build option that uses the preprocessor to select between versions of these functions (such as the modified version I have below). This PR just contains the modified function and would be edited to include the new build mode if people agree with this approach.Food for thought.