Rust-GPU / Rust-CUDA

Ecosystem of libraries and tools for writing and executing fast GPU code fully in Rust.
Apache License 2.0
3.02k stars 115 forks source link

mlir-nvvm #36

Closed kirawi closed 2 years ago

kirawi commented 2 years ago

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.

RDambrosio016 commented 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