Yinying Li
c5a67e16b6
[mlir][sparse] Use variable instead of inlining sparse encoding ( #72561 )
...
Example:
#CSR = #sparse_tensor.encoding<{
map = (d0, d1) -> (d0 : dense, d1 : compressed),
}>
// CHECK: #[[$CSR.*]] = #sparse_tensor.encoding<{ map = (d0, d1) -> (d0
: dense, d1 : compressed) }>
// CHECK-LABEL: func private @sparse_csr(
// CHECK-SAME: tensor<?x?xf32, **#[[$CSR]]**>)
func.func private @sparse_csr(tensor<?x?xf32, #CSR>)
2023-11-16 19:30:21 -05:00
Aart Bik
5f32bcfbae
[mlir][sparse][gpu] re-enable all GPU libgen tests ( #72185 )
...
Previous change no longer properly used the GPU libgen pass (even though
most tests still passed falling back to CPU). This revision puts the
proper pass order into place. Also bit of a cleanup of CPU codegen vs.
libgen setup.
2023-11-14 09:06:15 -08:00
Yinying Li
e2e429d994
[mlir][sparse] Migrate more tests to new syntax ( #66309 )
...
CSR:
`lvlTypes = [ "dense", "compressed" ]` to `map = (d0, d1) -> (d0 :
dense, d1 : compressed)`
CSC:
`lvlTypes = [ "dense", "compressed" ], dimToLvl = affine_map<(d0, d1) ->
(d1, d0)>` to `map = (d0, d1) -> (d1 : dense, d0 : compressed)`
This is an ongoing effort: #66146
2023-09-14 12:21:13 -04:00
Aart Bik
03125e6894
[mlir][sparse][gpu] fix missing dealloc
...
This dealloc was incorrectly removed in
https://reviews.llvm.org/D153173
Reviewed By: K-Wu
Differential Revision: https://reviews.llvm.org/D154564
2023-07-06 09:48:19 -07:00
Kun Wu
be2dd22b8f
[mlir][sparse][gpu] reuse CUDA environment handle throughout instance lifetime
...
Differential Revision: https://reviews.llvm.org/D153173
2023-06-30 21:52:34 +00:00
Kun Wu
97f4c22b3a
[mlir][sparse][gpu] unify dnmat and dnvec handle and ops
...
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D152465
2023-06-09 17:16:48 +00:00
Kun Wu
8ed59c53de
[mlir][sparse][gpu] add sm8.0+ tensor core 2:4 sparsity support
...
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D151775
2023-06-06 23:13:21 +00:00
Aart Bik
22caafc9f3
[mlir][sparse][gpu] end to end test for matmul
...
(1) minor bug fix in copy back [always nice to run stuff ;-)]
(2) run with and without lib (even though some fall back to CPU)
Reviewed By: wrengr
Differential Revision: https://reviews.llvm.org/D151507
2023-05-25 16:10:22 -07:00
Aart Bik
bcb698bfdc
[mlir][sparse][gpu] various cuSparse refinements
...
(1) keep all cuSparse ops on single stream without wait() in right order
(2) use more type precise memref types for COO
(3) use ToTensor on resulting memref (even though it folds away again)
Reviewed By: K-Wu
Differential Revision: https://reviews.llvm.org/D151404
2023-05-24 22:32:52 -07:00
Aart Bik
b75d6a40f1
[mlir][sparse][gpu] recognize SpMM cuSparse during sparsification
...
Reviewed By: Peiming
Differential Revision: https://reviews.llvm.org/D150715
2023-05-19 17:22:59 -07:00