Skip to content
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

Streamk v0.3 #660

Merged
merged 14 commits into from
Dec 4, 2024
Merged

Streamk v0.3 #660

merged 14 commits into from
Dec 4, 2024

Conversation

xiaohuguo2023
Copy link
Member

@xiaohuguo2023 xiaohuguo2023 commented Nov 6, 2024

streamk gemm script v0.3

  • new persistent gemm kernel
  • gemm benchmark tool using nearest neighbor approach.
  • new grid_model from Ryan
  • updated kernel interfaces and tuning scripts
  • reimplement stream-k atomic kernel which has no spills for large tile size
  • add bf16 support

@xiaohuguo2023 xiaohuguo2023 marked this pull request as ready for review November 27, 2024 21:15
Copy link
Member

@neoblizz neoblizz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, my biggest comment here is I wonder if there's a way to merge streamk_kernel and streamk_kernel_atomic with some constexpr, so it uses the same code but uses atomics for the partials instead. That seems to be the fundamental change between the two but a bunch of redundant code is being used.

python/perf-kernels/streamk/utils/gemm_wrapper.py Outdated Show resolved Hide resolved
python/perf-kernels/streamk/README.md Show resolved Hide resolved
python/perf-kernels/streamk/gemm_benchmark.py Outdated Show resolved Hide resolved
@xiaohuguo2023
Copy link
Member Author

Looks good to me, my biggest comment here is I wonder if there's a way to merge streamk_kernel and streamk_kernel_atomic with some constexpr, so it uses the same code but uses atomics for the partials instead. That seems to be the fundamental change between the two but a bunch of redundant code is being used.

the reason to put in atomics kernel here is for Ilia to test some accuracy issue of atomic_add, I would like to keep it separate for now just because we don't want to complicate the opt for our remainder part. We have next big task for reducing vgpr spills for the remainder.

@neoblizz
Copy link
Member

neoblizz commented Dec 4, 2024

Looks good to me, my biggest comment here is I wonder if there's a way to merge streamk_kernel and streamk_kernel_atomic with some constexpr, so it uses the same code but uses atomics for the partials instead. That seems to be the fundamental change between the two but a bunch of redundant code is being used.

the reason to put in atomics kernel here is for Ilia to test some accuracy issue of atomic_add, I would like to keep it separate for now just because we don't want to complicate the opt for our remainder part. We have next big task for reducing vgpr spills for the remainder.

Looks good, thanks!

@zhanglx13 zhanglx13 merged commit 5e49eae into main_perf Dec 4, 2024
4 checks passed
@xiaohuguo2023 xiaohuguo2023 deleted the streamk-v0.3 branch December 4, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants