-
Notifications
You must be signed in to change notification settings - Fork 37
[WIP] [StreamK] #782
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
base: main_perf
Are you sure you want to change the base?
[WIP] [StreamK] #782
Conversation
|
|
||
| if STREAMK_TILES == 0: | ||
| return | ||
|
|
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.
in fact, I was trying to use STREAK_TILES to avoid this "if" with line 113 and 115, otherwise, we could use full tiles and total tiles for this if ?
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.
In theory, when STREAM_TILES==0, start_iter == last_iter and we should not need the while loop. However, they are not constant, so compiler cannot optimize them out. I found this if a very nice way to early return :)
| else: | ||
| print("Unknown target") | ||
| exit(0) | ||
|
|
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.
how do we deal with MI308 80/64 CUs ?
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.
idk. There must be a way (hopefully a torch API) to query the number of cus from the GPU. Let me find it.
| kpack = 1 | ||
| else: | ||
| print("Unknown target") | ||
| exit(0) |
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.
same questions for MI308
| loop_k -= 1 | ||
|
|
||
| tl.assume(loop_k > 1) | ||
|
|
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.
nice catch!
| acc_dtype = tl.float32 if C.type.element_ty != tl.int8 else tl.int32 | ||
|
|
||
| for tile_id in range(pid, total_full_tiles, NUM_SMS): | ||
| for tile_id in tl.range(pid, total_full_tiles, NUM_SMS, flatten=True): |
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.
have you observed any perf improvement by enable this loop fusion ?
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.
no, this is just an experiment and it doesn't compile. I filed a ticket for it https://github.com/ROCm/triton-internal/issues/784
No description provided.