A recent change https://github.com/llvm/llvm-project/pull/167321 enabled
nvdsl examples to be run by default. These examples require MLIR python
bindings to be enabled, and this PR makes sure they're skipped if
`config.enable_bindings_python` is not enabled.
This PR re-lands https://github.com/llvm/llvm-project/pull/156830
This PR aims at fixing the nvdsl examples which got a bit out of sync
not being tested in the CI.
The fixed bugs were related to the following PRs:
- move to nanobind #118583
- split gpu module initialization #135478
- gpu dialect python API change #163883
This PR aims at fixing the nvdsl examples which got a bit out of sync
not being tested in the CI.
The fixed bugs were related to the following PRs:
- move to nanobind #118583
- split gpu module initialization #135478
I have a tutorial at EuroLLVM 2024 ([Zero to Hero: Programming Nvidia
Hopper Tensor Core with MLIR's NVGPU
Dialect](https://llvm.swoogo.com/2024eurollvm/session/2086997/zero-to-hero-programming-nvidia-hopper-tensor-core-with-mlir's-nvgpu-dialect)).
For that, I implemented tutorial codes in Python. The focus is the nvgpu
dialect and how to use its advanced features. I thought it might be
useful to upstream this.
The tutorial codes are as follows:
- **Ch0.py:** Hello World
- **Ch1.py:** 2D Saxpy
- **Ch2.py:** 2D Saxpy using TMA
- **Ch3.py:** GEMM 128x128x64 using Tensor Core and TMA
- **Ch4.py:** Multistage performant GEMM using Tensor Core and TMA
- **Ch5.py:** Warp Specialized GEMM using Tensor Core and TMA
I might implement one more chapter:
- **Ch6.py:** Warp Specialized Persistent ping-pong GEMM
This PR also introduces the nvdsl class, making IR building in the
tutorial easier.