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

[GPU] Add basic GPU support and example #381

Merged
merged 10 commits into from
Oct 12, 2024

Conversation

matrix72c
Copy link
Contributor

Basic GPU support for lowering linalg.matmul to GPU. Integrated from #290

  • Create Buddy GPU Dialact, and add three ops: hoist_static_alloc , unroll_vectors_gpu_mma_sync, vector_to_mma_conversion for transform dialact inside GPU dialact.
  • Extend MLIRGPU in Conversion, adding two passes: ConvertMemcpyToGPUPass and LegalizeShmemOutliningPass.
  • Add tests for both ops and passes.
  • Add a detailed example in examples/BuddyGPU.

Copy link
Member

@zhanghb97 zhanghb97 left a comment

Choose a reason for hiding this comment

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

Please use clang-format to format all the .cpp/.h files.

examples/BuddyGPU/matmul-cubin.mlir Outdated Show resolved Hide resolved
examples/BuddyGPU/run-module-gpu.py Outdated Show resolved Hide resolved
midend/lib/Conversion/MLIRGPU/ConvertMemcpyToGPU.cpp Outdated Show resolved Hide resolved
midend/lib/Conversion/MLIRGPU/LegalizeShmemOutlining.cpp Outdated Show resolved Hide resolved
midend/lib/Utils/GPUUtils.cpp Outdated Show resolved Hide resolved
midend/lib/Utils/GPUUtils.cpp Outdated Show resolved Hide resolved
midend/lib/Utils/GPUUtils.cpp Outdated Show resolved Hide resolved
midend/lib/Utils/GPUUtils.cpp Show resolved Hide resolved
midend/lib/Utils/GPUUtils.cpp Outdated Show resolved Hide resolved
Copy link
Member

@zhanghb97 zhanghb97 left a comment

Choose a reason for hiding this comment

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

Thanks!

@zhanghb97 zhanghb97 merged commit 22bb0fa into buddy-compiler:main Oct 12, 2024
ShiHaoGao pushed a commit to ShiHaoGao/buddy-mlir that referenced this pull request Oct 18, 2024
Co-authored-by: SForeKeeper <zkliu6@gmail.com>
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.

2 participants