[mlir][sparse] use proper type alias for filename ptr

Reviewed By: gussmith23

Differential Revision: https://reviews.llvm.org/D106904
This commit is contained in:
Aart Bik 2021-07-27 11:41:49 -07:00
parent 9812339005
commit 2b013a6c8a
8 changed files with 9 additions and 9 deletions

View File

@ -73,12 +73,12 @@ module {
// Read the sparse matrix from file, construct sparse storage.
%fileName = call @getTensorFilename(%c0) : (index) -> (!Filename)
%a = sparse_tensor.new %fileName
: !llvm.ptr<i8> to tensor<?x?xf64, #SparseMatrix>
: !Filename to tensor<?x?xf64, #SparseMatrix>
// Initialize all-dense annotated "sparse" matrix to all zeros.
%fileZero = call @getTensorFilename(%c1) : (index) -> (!Filename)
%x = sparse_tensor.new %fileZero
: !llvm.ptr<i8> to tensor<?x?xf64, #DenseMatrix>
: !Filename to tensor<?x?xf64, #DenseMatrix>
// Call the kernel.
%0 = call @dense_output(%a, %x)

View File

@ -75,7 +75,7 @@ module {
// Read the sparse tensor from file, construct sparse storage.
%fileName = call @getTensorFilename(%c0) : (index) -> (!Filename)
%a = sparse_tensor.new %fileName : !llvm.ptr<i8> to tensor<7x3x3x3x3x3x5x3xf64, #SparseTensor>
%a = sparse_tensor.new %fileName : !Filename to tensor<7x3x3x3x3x3x5x3xf64, #SparseTensor>
// Call the kernel.
%0 = call @kernel_flatten(%a, %x)

View File

@ -66,7 +66,7 @@ module {
// Read the sparse matrix from file, construct sparse storage.
%fileName = call @getTensorFilename(%c0) : (index) -> (!Filename)
%a = sparse_tensor.new %fileName : !llvm.ptr<i8> to tensor<?x?xi32, #SparseMatrix>
%a = sparse_tensor.new %fileName : !Filename to tensor<?x?xi32, #SparseMatrix>
// Initialize dense vectors.
%bdata = memref.alloc(%c256) : memref<?xi32>

View File

@ -72,7 +72,7 @@ module {
// Read the sparse B input from a file.
%fileName = call @getTensorFilename(%c0) : (index) -> (!Filename)
%b = sparse_tensor.new %fileName
: !llvm.ptr<i8> to tensor<?x?x?xf64, #SparseMatrix>
: !Filename to tensor<?x?x?xf64, #SparseMatrix>
// Initialize dense C and D inputs and dense output A.
%cdata = memref.alloc(%c3, %c5) : memref<?x?xf64>

View File

@ -59,7 +59,7 @@ module {
// Read the sparse matrix from file, construct sparse storage.
%fileName = call @getTensorFilename(%c0) : (index) -> (!Filename)
%x = sparse_tensor.new %fileName : !llvm.ptr<i8> to tensor<?x?xf64, #DCSR>
%x = sparse_tensor.new %fileName : !Filename to tensor<?x?xf64, #DCSR>
// Call kernel.
%0 = call @kernel_eltwise_mult(%x) : (tensor<?x?xf64, #DCSR>) -> tensor<?x?xf64, #DCSR>

View File

@ -88,7 +88,7 @@ module {
// Read the sparse matrix from file, construct sparse storage.
%fileName = call @getTensorFilename(%c0) : (index) -> (!Filename)
%s = sparse_tensor.new %fileName : !llvm.ptr<i8> to tensor<?x?xf32, #SparseMatrix>
%s = sparse_tensor.new %fileName : !Filename to tensor<?x?xf32, #SparseMatrix>
// Call the kernel.
%0 = call @sampled_dense_dense(%s, %a, %b, %x)

View File

@ -64,7 +64,7 @@ module {
// Read the sparse matrix from file, construct sparse storage.
%fileName = call @getTensorFilename(%c0) : (index) -> (!Filename)
%a = sparse_tensor.new %fileName : !llvm.ptr<i8> to tensor<?x?xf64, #SparseMatrix>
%a = sparse_tensor.new %fileName : !Filename to tensor<?x?xf64, #SparseMatrix>
// Initialize dense vectors.
%bdata = memref.alloc(%c256, %c4) : memref<?x?xf64>

View File

@ -63,7 +63,7 @@ module {
// Read the sparse matrix from file, construct sparse storage.
%fileName = call @getTensorFilename(%c0) : (index) -> (!Filename)
%a = sparse_tensor.new %fileName : !llvm.ptr<i8> to tensor<?x?xf64, #SparseMatrix>
%a = sparse_tensor.new %fileName : !Filename to tensor<?x?xf64, #SparseMatrix>
// Call the kernel.
%0 = call @kernel_sum_reduce(%a, %x)