Implement mapping: - `global`: 1 - `workgroup`: 3 - `private`: 0 Add `addressSpaceToStorageClass`, mapping GPU address spaces to SPIR-V storage classes to be able to use SPIR-V's `storageClassToAddressSpace`, mapping SPIR-V storage classes to LLVM address spaces according to our mapping above *by definition*. --------- Signed-off-by: Victor Perez <victor.perez@codeplay.com>
47 lines
742 B
CMake
47 lines
742 B
CMake
if ("NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)
|
|
set(NVPTX_LIBS
|
|
NVPTXCodeGen
|
|
NVPTXDesc
|
|
NVPTXInfo
|
|
)
|
|
endif()
|
|
|
|
if (MLIR_ENABLE_ROCM_CONVERSIONS)
|
|
set(AMDGPU_LIBS
|
|
AMDGPUCodeGen
|
|
AMDGPUDesc
|
|
AMDGPUInfo
|
|
)
|
|
endif()
|
|
|
|
add_mlir_conversion_library(MLIRGPUToGPURuntimeTransforms
|
|
AttrToSPIRVConverter.cpp
|
|
GPUToLLVMConversion.cpp
|
|
GPUOpsLowering.cpp
|
|
|
|
DEPENDS
|
|
MLIRConversionPassIncGen
|
|
intrinsics_gen
|
|
|
|
LINK_COMPONENTS
|
|
Core
|
|
MC
|
|
${AMDGPU_LIBS}
|
|
${NVPTX_LIBS}
|
|
|
|
LINK_LIBS PUBLIC
|
|
MLIRArithToLLVM
|
|
MLIRAsyncToLLVM
|
|
MLIRControlFlowToLLVM
|
|
MLIRConvertToLLVMPass
|
|
MLIRFuncToLLVM
|
|
MLIRGPUTransforms
|
|
MLIRIR
|
|
MLIRLLVMCommonConversion
|
|
MLIRLLVMDialect
|
|
MLIRMemRefToLLVM
|
|
MLIRPass
|
|
MLIRSupport
|
|
MLIRVectorToLLVM
|
|
)
|