Closed kirawi closed 2 years ago
Supporting amdgpu would not be a problem if amd actually documented how to use their target in a meaningful way (no documentation for llvm ir intrinsics?? Thats the most important part). MLIR would only add complications because the whole backend would have to be rewritten to use it. Besides, cg_ssa is already geared towards LLVM so using mlir wouldn't do much. And in the future once the backend is upstreamed we will be using rustc's llvm alongside it, so mlir would be another thing to install in every rustc binary
MLIR seems particularly attuned towards GPU compute, and adopting it may help with adopting backends other than CUDA in the future. I noticed that it has an nvvm backend. I'm unsure whether it would have the same difficulties as LLVMPTX.