[mlir][gpu][sparse] add gpu ops for sparse matrix computations
authorAart Bik <ajcbik@google.com>
Thu, 11 May 2023 20:56:34 +0000 (13:56 -0700)
committerAart Bik <ajcbik@google.com>
Fri, 12 May 2023 17:44:36 +0000 (10:44 -0700)
commitb700a90cc0aa08252d764b1f7da67bd300469a76
treeed31487f0e75ac76da26b2ad6f9b8ddd43231a2f
parent52761cb99164acd4ea76f91fc16a3e40ec94b898
[mlir][gpu][sparse] add gpu ops for sparse matrix computations

This revision extends the GPU dialect with ops that can be lowered to
host-oriented sparse matrix library calls (in this case cuSparse focused
although the ops could be generalized to support more GPUs in principle).
This will allow the "sparse compiler pipeline" to accelerate sparse operations
(see follow up revisions with examples of this).

For some background;

https://discourse.llvm.org/t/sparse-compiler-and-gpu-code-generation/69786/2

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D150152
mlir/include/mlir/Dialect/GPU/IR/GPUBase.td
mlir/include/mlir/Dialect/GPU/IR/GPUDialect.h
mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
mlir/lib/ExecutionEngine/CMakeLists.txt
mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
mlir/test/Conversion/GPUCommon/lower-sparse-to-gpu-runtime-calls.mlir [new file with mode: 0644]
mlir/test/Dialect/GPU/ops.mlir
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel