diff --git a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sm80-lt/sparse-matmul-2-4-lib.mlir b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sm80-lt/sparse-matmul-2-4-lib.mlir --- a/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sm80-lt/sparse-matmul-2-4-lib.mlir +++ b/mlir/test/Integration/Dialect/SparseTensor/GPU/CUDA/sm80-lt/sparse-matmul-2-4-lib.mlir @@ -1,5 +1,5 @@ // -// NOTE: this test requires gpu-sm80 +// NOTE: this test requires gpu-sm80 and cusparselt // // RUN: mlir-opt --convert-scf-to-cf -convert-cf-to-llvm --convert-vector-to-llvm \ // RUN: --convert-arith-to-llvm --gpu-to-llvm --reconcile-unrealized-casts \ @@ -69,9 +69,9 @@ %c64 = arith.constant 64 : index // Matrices A, B, C (16x32, 32x16, 16x16). - %a = memref.alloc() : memref<16x32xf16> // 16x32 but 2:4, row-major - %b = memref.alloc() : memref<32x16xf16> // regular dense column-major - %c = memref.alloc() : memref<16x16xf16> // accumulator row-major + %a = memref.alloc() : memref<16x32xf16> // 16x32 with 2:4, row-major + %b = memref.alloc() : memref<32x16xf16> // regular dense column-major + %c = memref.alloc() : memref<16x16xf16> // accumulator row-major // // Setup matrix A. @@ -181,27 +181,8 @@ vector.print %pb0 : vector<16xf16> } - // Maps the provided host buffers into the device address space. - // Writes from the host are guaranteed to be visible to device - // kernels that are launched afterwards. Writes from the device - // are guaranteed to be visible on the host after synchronizing - // with the device kernel completion. - %cast_a = memref.cast %a : memref<16x32xf16> to memref<*xf16> - gpu.host_register %cast_a : memref<*xf16> - %cast_b = memref.cast %b : memref<32x16xf16> to memref<*xf16> - gpu.host_register %cast_b : memref<*xf16> - %cast_c = memref.cast %c : memref<16x16xf16> to memref<*xf16> - gpu.host_register %cast_c : memref<*xf16> - // Call the kernel. - %t1 = arith.constant 1 : index - %t32 = arith.constant 32 : index call @sampled_matmul (%a, %b, %c): (memref<16x32xf16>, memref<32x16xf16>, memref<16x16xf16>) -> () - - // Unmaps the host buffers. - gpu.host_unregister %cast_a : memref<*xf16> - gpu.host_unregister %cast_b : memref<*xf16> - gpu.host_unregister %cast_c : memref<*xf16> // // Verify computed matrix C. @@ -227,7 +208,7 @@ %pc0 = vector.transfer_read %c[%pci, %c0], %f0 : memref<16x16xf16>, vector<16xf16> vector.print %pc0 : vector<16xf16> } - + llvm.call @mgpuDestroySparseLtEnv() : () -> () return }