Lines Matching refs:f32

20   func.func @cadd(%arga: tensor<?xcomplex<f32>, #SparseVector>,
21 %argb: tensor<?xcomplex<f32>, #SparseVector>)
22 -> tensor<?xcomplex<f32>, #SparseVector> {
24 %d = tensor.dim %arga, %c : tensor<?xcomplex<f32>, #SparseVector>
25 %xv = bufferization.alloc_tensor(%d) : tensor<?xcomplex<f32>, #SparseVector>
27 ins(%arga, %argb: tensor<?xcomplex<f32>, #SparseVector>,
28 tensor<?xcomplex<f32>, #SparseVector>)
29 outs(%xv: tensor<?xcomplex<f32>, #SparseVector>) {
30 ^bb(%a: complex<f32>, %b: complex<f32>, %x: complex<f32>):
31 %1 = complex.add %a, %b : complex<f32>
32 linalg.yield %1 : complex<f32>
33 } -> tensor<?xcomplex<f32>, #SparseVector>
34 return %0 : tensor<?xcomplex<f32>, #SparseVector>
37 func.func @cmul(%arga: tensor<?xcomplex<f32>, #SparseVector>,
38 %argb: tensor<?xcomplex<f32>, #SparseVector>)
39 -> tensor<?xcomplex<f32>, #SparseVector> {
41 %d = tensor.dim %arga, %c : tensor<?xcomplex<f32>, #SparseVector>
42 %xv = bufferization.alloc_tensor(%d) : tensor<?xcomplex<f32>, #SparseVector>
44 ins(%arga, %argb: tensor<?xcomplex<f32>, #SparseVector>,
45 tensor<?xcomplex<f32>, #SparseVector>)
46 outs(%xv: tensor<?xcomplex<f32>, #SparseVector>) {
47 ^bb(%a: complex<f32>, %b: complex<f32>, %x: complex<f32>):
48 %1 = complex.mul %a, %b : complex<f32>
49 linalg.yield %1 : complex<f32>
50 } -> tensor<?xcomplex<f32>, #SparseVector>
51 return %0 : tensor<?xcomplex<f32>, #SparseVector>
54 func.func @dump(%arg0: tensor<?xcomplex<f32>, #SparseVector>, %d: index) {
57 …%mem = sparse_tensor.values %arg0 : tensor<?xcomplex<f32>, #SparseVector> to memref<?xcomplex<f32>>
59 %v = memref.load %mem[%i] : memref<?xcomplex<f32>>
60 %real = complex.re %v : complex<f32>
61 %imag = complex.im %v : complex<f32>
62 vector.print %real : f32
63 vector.print %imag : f32
73 [ (511.13, 2.0), (3.0, 4.0), (5.0, 6.0) ] > : tensor<32xcomplex<f32>>
76 [ (1.0, 0.0), (2.0, 0.0), (3.0, 0.0) ] > : tensor<32xcomplex<f32>>
77 …%sv1 = sparse_tensor.convert %v1 : tensor<32xcomplex<f32>> to tensor<?xcomplex<f32>, #SparseVector>
78 …%sv2 = sparse_tensor.convert %v2 : tensor<32xcomplex<f32>> to tensor<?xcomplex<f32>, #SparseVector>
82 : (tensor<?xcomplex<f32>, #SparseVector>,
83 tensor<?xcomplex<f32>, #SparseVector>) -> tensor<?xcomplex<f32>, #SparseVector>
85 : (tensor<?xcomplex<f32>, #SparseVector>,
86 tensor<?xcomplex<f32>, #SparseVector>) -> tensor<?xcomplex<f32>, #SparseVector>
106 call @dump(%0, %d1) : (tensor<?xcomplex<f32>, #SparseVector>, index) -> ()
107 call @dump(%1, %d2) : (tensor<?xcomplex<f32>, #SparseVector>, index) -> ()
110 bufferization.dealloc_tensor %sv1 : tensor<?xcomplex<f32>, #SparseVector>
111 bufferization.dealloc_tensor %sv2 : tensor<?xcomplex<f32>, #SparseVector>
112 bufferization.dealloc_tensor %0 : tensor<?xcomplex<f32>, #SparseVector>
113 bufferization.dealloc_tensor %1 : tensor<?xcomplex<f32>, #SparseVector>