Until now, the GPU translation to NVVM or ROCDL intrinsics relied on the presence of the generic `gpu.kernel` attribute to attach additional LLVM IR metadata to the relevant functions. This would be problematic if each dialect were to handle the conversion of its own options, which is the intended direction for the translation infrastructure. Introduce `nvvm.kernel` and `rocdl.kernel` in addition to `gpu.kernel` and base translation on these new attributes instead. Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D96591
21 lines
423 B
CMake
21 lines
423 B
CMake
set(LLVM_TARGET_DEFINITIONS GPUToNVVM.td)
|
|
mlir_tablegen(GPUToNVVM.cpp.inc -gen-rewriters)
|
|
add_public_tablegen_target(MLIRGPUToNVVMIncGen)
|
|
|
|
add_mlir_conversion_library(MLIRGPUToNVVMTransforms
|
|
LowerGpuOpsToNVVMOps.cpp
|
|
|
|
DEPENDS
|
|
MLIRConversionPassIncGen
|
|
MLIRGPUToNVVMIncGen
|
|
|
|
LINK_LIBS PUBLIC
|
|
MLIRGPU
|
|
MLIRGPUToGPURuntimeTransforms
|
|
MLIRLLVMIR
|
|
MLIRNVVMIR
|
|
MLIRPass
|
|
MLIRStandardToLLVM
|
|
MLIRTransformUtils
|
|
)
|