-
Notifications
You must be signed in to change notification settings - Fork 16
Add tuned HIP GiMMiK preload-C and width variants with non-temporal loads and stores #19
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
Open
tomjen12
wants to merge
17
commits into
PyFR:master
Choose a base branch
from
tomjen12:hip-gimmik-optimized
base: master
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
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
8e23d63
Add tuned HIP GiMMiK preload variants
tomjen12 8f4d03e
Fix HIP GiMMiK block size metadata
tomjen12 96671a6
Address HIP GiMMiK review comments
tomjen12 739a82e
Handle ROCm feature suffixes for gfx942 tuning
tomjen12 0633539
Enable tuned HIP variants on gfx90a
tomjen12 7b59fb0
Parameterize HIP vector width and refine preload kernels
tomjen12 e9b921a
Use blockx launch bounds for HIP cstream preload
tomjen12 2aa2577
Always use non-temporal C accesses for HIP
tomjen12 be1c1db
feat(hip): add non-temporal B-load (NTB) variants for bstream-msplit
EricKing626 280e948
Use non-temporal B loads by default for HIP
tomjen12 c06216d
Make HIP preload-C a template option
tomjen12 e014e4d
Avoid HIP vector operator+= overloads
tomjen12 f6bc308
Prune HIP tuned variants to 12
tomjen12 a3aee45
Remove HIP variant arch gate
tomjen12 2c7af9b
Restore MI355 HIP baseline variants
tomjen12 f6075ec
Simplify HIP bstream preload-C beta handling
tomjen12 84bc001
Address HIP template review comments
tomjen12 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,56 @@ | ||
| % if dtype.endswith('4'): | ||
| static inline __device__ ${dtype} make_zero() | ||
| inline __device__ ${dtype} operator+(${dtype} a, ${dtype} b) | ||
| { return make_${dtype}(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w); } | ||
|
|
||
| inline __device__ ${dtype} operator*(${dtype[:-1]} a, ${dtype} b) | ||
| { return make_${dtype}(a*b.x, a*b.y, a*b.z, a*b.w); } | ||
|
|
||
| inline __device__ ${dtype} make_zero() | ||
| { return make_${dtype}(0, 0, 0, 0); } | ||
| % elif dtype.endswith('2'): | ||
| static inline __device__ ${dtype} make_zero() | ||
| inline __device__ ${dtype} operator+(${dtype} a, ${dtype} b) | ||
| { return make_${dtype}(a.x + b.x, a.y + b.y); } | ||
|
|
||
| inline __device__ ${dtype} operator*(${dtype[:-1]} a, ${dtype} b) | ||
| { return make_${dtype}(a*b.x, a*b.y); } | ||
|
|
||
| inline __device__ ${dtype} make_zero() | ||
| { return make_${dtype}(0, 0); } | ||
| % else: | ||
| static inline __device__ ${dtype} make_zero() | ||
| inline __device__ ${dtype} make_zero() | ||
| { return 0; } | ||
| % endif | ||
|
|
||
| static inline __device__ void | ||
| nt_store(${dtype}* p, ${dtype} v) | ||
| { | ||
| % if dtype.endswith('4'): | ||
| __builtin_nontemporal_store(v.x, &p->x); | ||
| __builtin_nontemporal_store(v.y, &p->y); | ||
| __builtin_nontemporal_store(v.z, &p->z); | ||
| __builtin_nontemporal_store(v.w, &p->w); | ||
| % elif dtype.endswith('2'): | ||
| __builtin_nontemporal_store(v.x, &p->x); | ||
| __builtin_nontemporal_store(v.y, &p->y); | ||
| % else: | ||
| __builtin_nontemporal_store(v, p); | ||
| % endif | ||
| } | ||
|
|
||
| static inline __device__ ${dtype} | ||
| nt_load(const ${dtype}* p) | ||
| { | ||
| % if dtype.endswith('4'): | ||
| return make_${dtype}(__builtin_nontemporal_load(&p->x), | ||
| __builtin_nontemporal_load(&p->y), | ||
| __builtin_nontemporal_load(&p->z), | ||
| __builtin_nontemporal_load(&p->w)); | ||
| % elif dtype.endswith('2'): | ||
| return make_${dtype}(__builtin_nontemporal_load(&p->x), | ||
| __builtin_nontemporal_load(&p->y)); | ||
| % else: | ||
| return __builtin_nontemporal_load(p); | ||
| % endif | ||
| } | ||
|
|
||
| ${next.body()} |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.