-
Notifications
You must be signed in to change notification settings - Fork 270
[CK] add inter/intrawave scheduling concept doc #3660
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: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,26 @@ | ||||||
| .. meta:: | ||||||
| :description: Intrawave and interwave scheduling with CK Tile | ||||||
| :keywords: composable kernel, CK, CK Tile, ROCm, API, scheduling, intrawave, interwave | ||||||
|
|
||||||
| ************************************************************ | ||||||
| Intrawave and interwave scheduling with CK Tile | ||||||
| ************************************************************ | ||||||
|
|
||||||
| Two different scheduling pipelines are available to use with CK Tile's GEMM implementation. | ||||||
|
|
||||||
| The interwave and intrawave scheduling pipelines coordinate waves in K dimension accumulation loops. Whether to use the interwave or intrawave pipeline depends on whether the workload is memory-bound or compute-bound. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no hyphen in "k dimension", right? right?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no |
||||||
|
|
||||||
| In interwave scheduling, the K dimension is separated into chunks. The same chunk is loaded into each wave. When the chunk has been loaded into all the waves, the same operation is run on the chunk. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed the sentences altogether. |
||||||
|
|
||||||
| Once all the waves have completed the operation, the next chunk is loaded into the waves. | ||||||
|
|
||||||
| Because all the waves are synchronized, memory accesses are coordinated, and the cache hit rate is optimized, interwave scheduling is best for memory-bound workloads. | ||||||
|
|
||||||
| In intrawave scheduling, the full K dimension is loaded into each wave. Each wave runs its own operation on the K dimension independently of the other waves, and without any synchronization with the other waves. The compute unit (CU) is responsible for interleaving the independent operations. | ||||||
|
|
||||||
| Because the CU has flexibility in scheduling operations, intrawave scheduling is best for compute-bound workloads. | ||||||
|
|
||||||
| An example of both interwave and intrawave scheduling can be found in |gemm_utils.hpp|_, which is part of the `GEMM with CK Tile example <https://github.com/ROCm/composable_kernel/blob/develop/example/ck_tile/03_gemm/README.md>`_. | ||||||
spolifroni-amd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
| .. |gemm_utils.hpp| replace:: ``gemm_utils.hpp`` | ||||||
| .. _gemm_utils.hpp: https://github.com/ROCm/composable_kernel/blob/develop/example/ck_tile/03_gemm/gemm_utils.hpp#L37 | ||||||
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.
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 like mine better