Add tuned HIP GiMMiK preload-C and width variants with non-temporal loads and stores#19
Open
tomjen12 wants to merge 4 commits into
Open
Add tuned HIP GiMMiK preload-C and width variants with non-temporal loads and stores#19tomjen12 wants to merge 4 commits into
tomjen12 wants to merge 4 commits into
Conversation
Author
|
Hi @FreddieWitherden , could you please review this PR when you have a chance? |
| if A[j, kx] != 0: | ||
| nzixs.append((l_idx, kx)) | ||
|
|
||
| has_dotp = any(A[j, kx] != 0 for kx in range(k)) |
Contributor
There was a problem hiding this comment.
As A is a numpy array this can likely be simplified as A[j].any() (I think!). Same for the above for where we can eliminate the explicit Python loop with something built upon A[j, kbx].
|
|
||
| % if width == 2: | ||
| static inline __device__ ${dtype} | ||
| gimmik_vmul(${dtype[:-1]} a, ${dtype} b) |
Contributor
There was a problem hiding this comment.
Might be worth moving these up into a shared file which other kernels can include via Mako. Keeps all of the vector stuff in one place.
Contributor
|
Overall looks good. Few quick things:
|
Contributor
|
Couple of other notes (mostly for me):
|
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
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.
Summary
Adds tuned HIP GiMMiK preload and vector-width variants for PyFR-style matrix multiplication cases.
The new variants include C-preload kernels for cstream/bstream and aligned width-2 preload variants. Existing and new HIP templates now use shared non-temporal load/store helpers for C accesses.
Results
On MI300X PyFR GiMMiK matmul benchmarks across 53 double-precision p2-p5 cases, bandwidth efficiency versus a 4.4 TB/s target improved from:
Companion PyFR PR: PyFR/PyFR#567
Test plan