[Mlir-commits] [clang] [llvm] [mlir] [NVPTX] Switch front-ends and tests to ptx_kernel cc (PR #120806)

Alex MacLean llvmlistbot at llvm.org
Mon Dec 23 09:12:16 PST 2024


AlexMaclean wrote:

> In MLIR, we also have other NVVM metadata such as `reqntid` and `maxntid`, among others. What is the plan for these? Will they remain as metadata, or will they be expressed differently?

Eventually, I hope to migrate all !nvvm.annotations, including `reqntid` and `maxntid`, to a more modern mechanism such as attributes, or at least metadata attached directly to the function/GV. !nvvm.annotations was added around llvm 3 when target-specific attributes were not yet present. 

> Could you please elaborate on the compile-time improvements?

Auto-upgrading kernel metadata and no longer traversing !nvvm.annotations lead to around a 2% improvement in compile time for several cases in nvcc. This change alone won't have the same impact, since we still traverse the metadata for functions that do not have the `ptx_kernel` cc but it at least lets up bail out early some of the time and lays the foundation for bigger improvements.

https://github.com/llvm/llvm-project/pull/120806


More information about the Mlir-commits mailing list