AMD has introduced FlyDSL, a new Python domain-specific language (DSL) designed to simplify the development and testing of high-performance GPU kernels. The tool is part of AMD's efforts to streamline the creation of efficient kernels for GPU computing, allowing developers to achieve performance comparable to hand-tuned C++ kernels while reducing complexity. The tool was tested on an AMD Instinct™ MI355X GPU using ROCm 7.2.2 and FlyDSL 0.2.0.
FlyDSL, which stands for 'Flexible Layout Python DSL,' is an MLIR-based language that provides expert users with fine-grained control over kernel code. It supports both CuTe layout algebra for formal verification and regular indexing for easier understanding. Developers can use FlyDSL to write kernels that match or exceed the performance of traditional C++ kernels with significantly less complexity. The tool also allows for pre-compilation of kernels to minimize launch overhead.
The article provides a detailed explanation of how to structure a FlyDSL kernel, including the use of .kernel and .jit functions for kernel and launch code respectively. It also covers how to access global memory using buffer resource descriptors and how to work with MFMA instructions. The tool's developers emphasize that while FlyDSL is still under active development, it offers a promising approach to GPU kernel development.
Source: amd