/external/tensorflow/tensorflow/compiler/mlir/hlo/tests/ |
D | lhlo_ops.mlir | 5 func @invalid_allreduce(%input0: memref<2xf32>, %input1: memref<3xf32>) { 6 …// expected-error@+1 {{requires operand #1 (type: 'memref<3xf32>') and result #1 (type: 'memref<2x… 14 …use_global_device_ids = false} : (memref<2xf32>, memref<3xf32>, memref<2xf32>, memref<2xf32>) -> () 20 func @invalid_allreduce(%input0: memref<2xf32>, %input1: memref<3xf16>) { 29 …use_global_device_ids = false} : (memref<2xf32>, memref<3xf16>, memref<2xf32>, memref<3xf16>) -> () 35 func @invalid_allgather(%input0: memref<2xf32>, %output: memref<8xf32>) { 40 …use_global_device_ids = false, all_gather_dimension = 0 : i64} : (memref<2xf32>, memref<8xf32>) ->… 46 func @invalid_alltoall(%input0: memref<2xf32>, %output: memref<8xf32>) { 51 …use_global_device_ids = false, all_gather_dimension = 0 : i64} : (memref<2xf32>, memref<8xf32>) ->… 57 func @invalid_alltoall(%input0: memref<2xf32>, %output: memref<8xf32>) { [all …]
|
D | lhlo_gpu_ops.mlir | 4 func @batch_norm_grad_memrefs(%arg0: memref<8x8x8x8xf32>, %arg1: memref<8xf32>, %arg2: memref<8xf32… 5 %arg3: memref<8xf32>, %arg4: memref<8x8x8x8xf32>, 6 %grad_operand: memref<8x8x8x8xf32>, %grad_scale: memref<8xf32>, 7 %grad_offset: memref<8xf32>) -> () { 9 : (memref<8x8x8x8xf32>, memref<8xf32>, memref<8xf32>, memref<8xf32>, memref<8x8x8x8xf32>, 10 memref<8x8x8x8xf32>, memref<8xf32>, memref<8xf32>) -> () 15 func @batch_norm_inference_memrefs(%arg0: memref<8x8x8x8xf32>, %arg1: memref<8xf32>, %arg2: memref<… 16 … %arg3: memref<8xf32>, %arg4: memref<8xf32>, %arg_out: memref<8x8x8x8xf32>) -> () { 18 …: (memref<8x8x8x8xf32>, memref<8xf32>, memref<8xf32>, memref<8xf32>, memref<8xf32>, memref<8x8x8x8… 23 func @batch_norm_training_memrefs(%arg0: memref<8x8x8x8xf32>, %arg1: memref<8xf32>, %arg2: memref<8… [all …]
|
D | lhlo-legalize-to-affine.mlir | 5 func @min_op(%lhs: memref<4x3x2x1xf32>, %rhs: memref<4x3x2x1xf32>, 6 %result: memref<4x3x2x1xf32>) -> () { 12 …// CHECK-NEXT: %[[LHS:.*]] = affine.load %{{.*}}[%[[I]], %[[J]], %[[K]], %[[L]]] : memref<… 13 …// CHECK-NEXT: %[[RHS:.*]] = affine.load %{{.*}}[%[[I]], %[[J]], %[[K]], %[[L]]] : memref<… 18 … affine.store %[[MIN_NONAN]], %{{.*}}[%[[I]], %[[J]], %[[K]], %[[L]]] : memref<4x3x2x1xf32> 21 (memref<4x3x2x1xf32>, memref<4x3x2x1xf32>, memref<4x3x2x1xf32>) -> () 27 func @float_add_op(%lhs: memref<7xf32>, %rhs: memref<7xf32>, 28 %result: memref<7xf32>) -> () { 31 : (memref<7xf32>, memref<7xf32>, memref<7xf32>) -> () 35 func @int_add_op(%lhs: memref<7xi32>, %rhs: memref<7xi32>, [all …]
|
D | lhlo-legalize-to-linalg.mlir | 5 func @element_wise(%lhs: memref<2x2xf32>, %rhs: memref<2x2xf32>, 6 %result: memref<2x2xf32>) { 8 : (memref<2x2xf32>, memref<2x2xf32>, memref<2x2xf32>) -> () 20 func @element_wise(%lhs: memref<2x2xf32>, %rhs: memref<2x2xf32>, 21 %result: memref<2x2xf32>) { 23 : (memref<2x2xf32>, memref<2x2xf32>, memref<2x2xf32>) -> () 34 func @element_wise_with_dynamic_shape(%lhs: memref<?x?xf32>, 35 %rhs: memref<?x?xf32>, 36 %result: memref<?x?xf32>) { 38 : (memref<?x?xf32>, memref<?x?xf32>, memref<?x?xf32>) -> () [all …]
|
/external/llvm-project/mlir/test/Transforms/ |
D | buffer-hoisting.mlir | 16 func @condBranch(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) { 19 br ^bb3(%arg1 : memref<2xf32>) 21 %0 = alloc() : memref<2xf32> 22 test.buffer_based in(%arg1: memref<2xf32>) out(%0: memref<2xf32>) 23 br ^bb3(%0 : memref<2xf32>) 24 ^bb3(%1: memref<2xf32>): 25 test.copy(%1, %arg2) : (memref<2xf32>, memref<2xf32>) 47 %arg1: memref<?xf32>, 48 %arg2: memref<?xf32>, 52 br ^bb3(%arg1 : memref<?xf32>) [all …]
|
D | buffer-results-to-out-params.mlir | 4 // CHECK-SAME: %[[ARG:.*]]: memref<f32>) { 5 // CHECK: %[[RESULT:.*]] = "test.source"() : () -> memref<f32> 6 // CHECK: linalg.copy(%[[RESULT]], %[[ARG]]) : memref<f32>, memref<f32> 9 func @basic() -> (memref<f32>) { 10 %0 = "test.source"() : () -> (memref<f32>) 11 return %0 : memref<f32> 15 // CHECK-SAME: %[[ARG0:.*]]: memref<1xf32>, 16 // CHECK-SAME: %[[ARG1:.*]]: memref<2xf32>) { 17 // CHECK: %[[RESULT:.*]] = "test.source"() : () -> memref<2xf32> 18 // CHECK: linalg.copy(%[[RESULT]], %[[ARG1]]) : memref<2xf32>, memref<2xf32> [all …]
|
D | buffer-loop-hoisting.mlir | 15 func @condBranch(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) { 18 br ^bb3(%arg1 : memref<2xf32>) 20 %0 = alloc() : memref<2xf32> 21 test.buffer_based in(%arg1: memref<2xf32>) out(%0: memref<2xf32>) 22 br ^bb3(%0 : memref<2xf32>) 23 ^bb3(%1: memref<2xf32>): 24 test.copy(%1, %arg2) : (memref<2xf32>, memref<2xf32>) 46 %arg1: memref<?xf32>, 47 %arg2: memref<?xf32>, 51 br ^bb3(%arg1 : memref<?xf32>) [all …]
|
D | copy-removal.mlir | 8 func @nested_region_control_flow_div_nested(%arg0: index, %arg1: index) -> memref<?x?xf32> { 10 %1 = alloc(%arg0, %arg0) : memref<?x?xf32> 12 %2 = scf.if %0 -> (memref<?x?xf32>) { 14 %3 = scf.if %0 -> (memref<?x?xf32>) { 16 %7 = dim %1, %c0_0 : memref<?x?xf32> 18 %8 = dim %1, %c1_1 : memref<?x?xf32> 19 %9 = alloc(%7, %8) : memref<?x?xf32> 21 linalg.copy(%1, %9) : memref<?x?xf32>, memref<?x?xf32> 23 scf.yield %9 : memref<?x?xf32> 26 %7 = alloc(%arg0, %arg1) : memref<?x?xf32> [all …]
|
D | normalize-memrefs.mlir | 3 // This file tests whether the memref type having non-trivial map layouts 8 %A = alloc() : memref<64x256xf32, affine_map<(d0, d1) -> (d1, d0)>> 11 %1 = affine.load %A[%i, %j] : memref<64x256xf32, affine_map<(d0, d1) -> (d1, d0)>> 15 dealloc %A : memref<64x256xf32, affine_map<(d0, d1) -> (d1, d0)>> 18 // The old memref alloc should disappear. 19 // CHECK-NOT: memref<64x256xf32> 20 // CHECK: [[MEM:%[0-9]+]] = alloc() : memref<256x64xf32> 23 // CHECK-NEXT: affine.load [[MEM]][%[[J]], %[[I]]] : memref<256x64xf32> 32 // CHECK-NEXT: alloc() : memref<65xf32> 33 %A = alloc() : memref<64xf32, affine_map<(d0) -> (d0 + 1)>> [all …]
|
D | promote-buffers-to-stack.mlir | 4 // RUN: mlir-opt -promote-buffers-to-stack="max-rank-of-allocated-memref=2" -split-input-file %s | … 19 func @condBranch(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) { 22 br ^bb3(%arg1 : memref<2xf32>) 24 %0 = alloc() : memref<2xf32> 25 test.buffer_based in(%arg1: memref<2xf32>) out(%0: memref<2xf32>) 26 br ^bb3(%0 : memref<2xf32>) 27 ^bb3(%1: memref<2xf32>): 28 test.copy(%1, %arg2) : (memref<2xf32>, memref<2xf32>) 52 %arg1: memref<?xf32>, 53 %arg2: memref<?xf32>, [all …]
|
D | pipeline-data-transfer.mlir | 11 %A = alloc() : memref<256 x f32, affine_map<(d0) -> (d0)>, 0> 12 %Ah = alloc() : memref<32 x f32, affine_map<(d0) -> (d0)>, 1> 14 %tag = alloc() : memref<1 x f32> 20 ….dma_start %A[%i], %Ah[%i], %tag[%zero], %num_elts : memref<256 x f32>, memref<32 x f32, 1>, memre… 21 affine.dma_wait %tag[%zero], %num_elts : memref<1 x f32> 22 %v = affine.load %Ah[%i] : memref<32 x f32, affine_map<(d0) -> (d0)>, 1> 24 affine.store %r, %Ah[%i] : memref<32 x f32, affine_map<(d0) -> (d0)>, 1> 29 dealloc %tag : memref<1 x f32> 30 dealloc %Ah : memref<32 x f32, affine_map<(d0) -> (d0)>, 1> 33 // CHECK: %{{.*}} = alloc() : memref<256xf32> [all …]
|
D | normalize-memrefs-ops.mlir | 17 // CHECK-SAME: (%[[ARG0:.*]]: memref<1x16x1x1x32x64xf32>) 18 func @test_norm(%arg0 : memref<1x16x14x14xf32, #map0>) -> () { 19 %0 = alloc() : memref<1x16x14x14xf32, #map0> 20 "test.op_norm"(%arg0, %0) : (memref<1x16x14x14xf32, #map0>, memref<1x16x14x14xf32, #map0>) -> () 21 dealloc %0 : memref<1x16x14x14xf32, #map0> 23 // CHECK: %[[v0:.*]] = alloc() : memref<1x16x1x1x32x64xf32> 24 …// CHECK: "test.op_norm"(%[[ARG0]], %[[v0]]) : (memref<1x16x1x1x32x64xf32>, memref<1x16x1x1x32x64x… 25 // CHECK: dealloc %[[v0]] : memref<1x16x1x1x32x64xf32> 32 // CHECK-SAME: (%[[ARG0:.*]]: memref<1x16x14x14xf32, #map>) 33 func @test_nonnorm(%arg0 : memref<1x16x14x14xf32, #map0>) -> () { [all …]
|
D | buffer-deallocation.mlir | 19 func @condBranch(%arg0: i1, %arg1: memref<2xf32>, %arg2: memref<2xf32>) { 22 br ^bb3(%arg1 : memref<2xf32>) 24 %0 = alloc() : memref<2xf32> 25 test.buffer_based in(%arg1: memref<2xf32>) out(%0: memref<2xf32>) 26 br ^bb3(%0 : memref<2xf32>) 27 ^bb3(%1: memref<2xf32>): 28 test.copy(%1, %arg2) : (memref<2xf32>, memref<2xf32>) 64 %arg1: memref<?xf32>, 65 %arg2: memref<?xf32>, 69 br ^bb3(%arg1 : memref<?xf32>) [all …]
|
/external/llvm-project/mlir/test/Dialect/Linalg/ |
D | promote.mlir | 12 func @matmul_f32(%A: memref<?xi8>, %M: index, %N: index, %K: index) { 18 %3 = view %A[%c0][%M, %K] : memref<?xi8> to memref<?x?xf32> 19 %4 = view %A[%c0][%K, %N] : memref<?xi8> to memref<?x?xf32> 20 %5 = view %A[%c0][%M, %N] : memref<?xi8> to memref<?x?xf32> 21 %6 = dim %3, %c0 : memref<?x?xf32> 22 %7 = dim %3, %c1 : memref<?x?xf32> 23 %8 = dim %4, %c1 : memref<?x?xf32> 27 …%11 = std.subview %3[%arg4, %arg6][%c2, %c4][1, 1] : memref<?x?xf32> to memref<?x?xf32, offset: ?,… 28 …%14 = std.subview %4[%arg6, %arg5][%c4, %c3][1, 1] : memref<?x?xf32> to memref<?x?xf32, offset: ?,… 29 …%17 = std.subview %5[%arg4, %arg5][%c2, %c3][1, 1] : memref<?x?xf32> to memref<?x?xf32, offset: ?,… [all …]
|
D | fusion.mlir | 3 func @f1(%A: memref<?x?xf32, offset: 0, strides: [?, 1]>, 4 %B: memref<?x?xf32, offset: 0, strides: [?, 1]>, 5 %C: memref<?x?xf32, offset: 0, strides: [?, 1]>, 6 %D: memref<?x?xf32, offset: 0, strides: [?, 1]>, 7 %E: memref<?x?xf32, offset: 0, strides: [?, 1]> 8 ) -> memref<?x?xf32, offset: 0, strides: [?, 1]> { 14 %0 = dim %A, %c0 : memref<?x?xf32, offset: 0, strides: [?, 1]> 15 %1 = dim %A, %c1 : memref<?x?xf32, offset: 0, strides: [?, 1]> 16 %2 = dim %B, %c1 : memref<?x?xf32, offset: 0, strides: [?, 1]> 17 linalg.matmul ins(%A, %B : memref<?x?xf32, offset: 0, strides: [?, 1]>, [all …]
|
D | forward-vector-transfers.mlir | 4 // CHECK-SAME: %[[ARG0:[0-9a-zA-Z]*]]: memref 10 func @testAllocRead(%in: memref<? x f32>) -> vector<32 x f32> { 13 %alloc = alloc() : memref<32 x f32> 14 %subview = subview %alloc[0][16][1] : memref<32 x f32> to memref<16 x f32> 15 linalg.copy(%in, %subview): memref<? x f32>, memref<16 x f32> 16 %0 = vector.transfer_read %alloc[%c0], %f0 {masked = [false]} : memref<32 x f32>, vector<32 x f32> 17 dealloc %alloc : memref<32 x f32> 22 // CHECK-SAME: %[[ARG0:[0-9a-zA-Z]*]]: memref 28 func @testAllocFillRead(%in: memref<? x f32>) -> vector<32 x f32> { 31 %alloc = alloc() : memref<32 x f32> [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tools/kernel_gen/tests/ |
D | buffer_reuse.mlir | 4 func @unique_reuse_output() -> (index, memref<2x3xi64>) attributes {tf_entry} { 8 %result_1 = alloc() : memref<2x3xi64> 9 return %result_0, %result_1 : index, memref<2x3xi64> 14 -> (memref<2x3xi64>, memref<2x3xi64>) attributes {tf_entry} { 17 %mem = alloc() : memref<2x3xi64> 18 %other_mem = alloc() : memref<2x3xi64> 21 return %mem, %other_mem : memref<2x3xi64>, memref<2x3xi64> 23 return %other_mem, %mem : memref<2x3xi64>, memref<2x3xi64> 28 %smaller : memref<5xi64>, 29 %greater : memref<7xi64>, [all …]
|
/external/llvm-project/mlir/test/Dialect/OpenMP/ |
D | ops.mlir | 54 func @omp_parallel(%data_var : memref<i32>, %if_cond : i1, %num_threads : si32) -> () { 55 …memref<i32>) firstprivate(%{{.*}} : memref<i32>) shared(%{{.*}} : memref<i32>) copyin(%{{.*}} : me… 59 …memref<i32>) firstprivate(%{{.*}} : memref<i32>) shared(%{{.*}} : memref<i32>) copyin(%{{.*}} : me… 62 …32>, default_val = "defshared"} : (si32, memref<i32>, memref<i32>, memref<i32>, memref<i32>, memre… 68 …memref<i32>) firstprivate(%{{.*}} : memref<i32>) shared(%{{.*}} : memref<i32>) copyin(%{{.*}} : me… 71 …,0,1,1,1,1,1,1]> : vector<8xi32>} : (i1, memref<i32>, memref<i32>, memref<i32>, memref<i32>, memre… 74 … si32) private(%{{.*}} : memref<i32>) firstprivate(%{{.*}} : memref<i32>) shared(%{{.*}} : memref<… 77 …ense<[1,1,1,1,1,1,0,0]> : vector<8xi32>} : (i1, si32, memref<i32>, memref<i32>, memref<i32>, memre… 80 …, proc_bind_val = "spread"} : (i1, si32, memref<i32>, memref<i32>, memref<i32>, memref<i32>, memre… 83 …memref<i32>) firstprivate(%{{.*}} : memref<i32>, %{{.*}} : memref<i32>) shared(%{{.*}} : memref<i3… [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/mlir_gpu/tests/passes/ |
D | rewrite_kernel_signatures.mlir | 8 // CHECK-SAME: %{{.*}}: memref<32xf32>, %{{.*}}: memref<16xf32>, 9 // CHECK-SAME: %{{.*}}: memref<8xf32> 10 gpu.func @kernel(%arg0: memref<8xf32>, %arg1: memref<16xf32>, 11 %arg2: memref<32xf32>) kernel { 17 func @caller(%arg0: memref<32xf32>, %arg1: memref<16xf32>) -> memref<8xf32> { 19 %res = alloc() : memref<8xf32> 22 // CHECK-SAME: memref<32xf32>, 23 // CHECK-SAME: memref<16xf32>, 24 // CHECK-SAME: memref<8xf32>) 27 args(%res : memref<8xf32>, %arg1 : memref<16xf32>, %arg0 : memref<32xf32>) [all …]
|
/external/llvm-project/mlir/test/mlir-cpu-runner/ |
D | unranked_memref.mlir | 37 %A = alloc() : memref<10x3xf32, 0> 42 %V = memref_cast %A : memref<10x3xf32, 0> to memref<?x?xf32> 43 linalg.fill(%V, %f10) : memref<?x?xf32, 0>, f32 44 %U = memref_cast %A : memref<10x3xf32, 0> to memref<*xf32> 45 call @print_memref_f32(%U) : (memref<*xf32>) -> () 47 %V2 = memref_cast %U : memref<*xf32> to memref<?x?xf32> 48 linalg.fill(%V2, %f5) : memref<?x?xf32, 0>, f32 49 %U2 = memref_cast %V2 : memref<?x?xf32, 0> to memref<*xf32> 50 call @print_memref_f32(%U2) : (memref<*xf32>) -> () 52 %V3 = memref_cast %V2 : memref<?x?xf32> to memref<*xf32> [all …]
|
D | memref_reshape.mlir | 7 func private @print_memref_f32(memref<*xf32>) attributes { llvm.emit_c_interface } 14 %input = alloc() : memref<2x3xf32> 15 %dim_x = dim %input, %c0 : memref<2x3xf32> 16 %dim_y = dim %input, %c1 : memref<2x3xf32> 22 store %val_f32, %input[%i, %j] : memref<2x3xf32> 24 %unranked_input = memref_cast %input : memref<2x3xf32> to memref<*xf32> 25 call @print_memref_f32(%unranked_input) : (memref<*xf32>) -> () 31 %shape = alloc() : memref<2xindex> 34 store %c3, %shape[%c0] : memref<2xindex> 35 store %c2, %shape[%c1] : memref<2xindex> [all …]
|
/external/llvm-project/mlir/test/mlir-rocm-runner/ |
D | vecadd.mlir | 3 func @vecadd(%arg0 : memref<?xf32>, %arg1 : memref<?xf32>, %arg2 : memref<?xf32>) { 6 %block_dim = dim %arg0, %c0 : memref<?xf32> 9 %a = load %arg0[%tx] : memref<?xf32> 10 %b = load %arg1[%tx] : memref<?xf32> 12 store %c, %arg2[%tx] : memref<?xf32> 24 %0 = alloc() : memref<5xf32> 25 %1 = alloc() : memref<5xf32> 26 %2 = alloc() : memref<5xf32> 27 %3 = memref_cast %0 : memref<5xf32> to memref<?xf32> 28 %4 = memref_cast %1 : memref<5xf32> to memref<?xf32> [all …]
|
/external/llvm-project/mlir/test/Dialect/Affine/ |
D | dma-generate.mlir | 17 %A = alloc() : memref<256 x f32> 18 %B = alloc() : memref<512 x f32> 19 %F = alloc() : memref<256 x f32, 2> 21 // CHECK: alloc() : memref<256xf32> 22 // CHECK: alloc() : memref<256xf32, 2> 24 // CHECK: alloc() : memref<1xi32> 26 …{{.*}}], %{{.*}}[%{{.*}}], %{{.*}}[%{{.*}}], %{{.*}} : memref<256xf32>, memref<256xf32, 2>, memref… 27 // CHECK: affine.dma_wait %{{.*}}[%{{.*}}], %{{.*}} : memref<1xi32> 29 // CHECK: alloc() : memref<256xf32, 2> 31 // CHECK: alloc() : memref<1xi32> [all …]
|
D | dma.mlir | 7 %0 = alloc() : memref<100x100xf32> 8 %1 = alloc() : memref<100x100xf32, affine_map<(d0, d1) -> (d0, d1)>, 2> 9 %2 = alloc() : memref<1xi32> 15 : memref<100x100xf32>, memref<100x100xf32, 2>, memref<1xi32> 16 affine.dma_wait %2[%c0], %c64 : memref<1xi32> 17 …*}}[%{{.*}}, %{{.*}}], %{{.*}}[%{{.*}}], %{{.*}} : memref<100x100xf32>, memref<100x100xf32, 2>, me… 18 // CHECK: affine.dma_wait %{{.*}}[%{{.*}}], %{{.*}} : memref<1xi32> 28 %0 = alloc() : memref<100x100xf32> 29 %1 = alloc() : memref<100x100xf32, affine_map<(d0, d1) -> (d0, d1)>, 2> 30 %2 = alloc() : memref<1xi32> [all …]
|
/external/llvm-project/mlir/test/Dialect/OpenACC/ |
D | ops.mlir | 7 func @compute1(%A: memref<10x10xf32>, %B: memref<10x10xf32>, %C: memref<10x10xf32>) -> memref<10x10… 18 %a = load %A[%arg3, %arg5] : memref<10x10xf32> 19 %b = load %B[%arg5, %arg4] : memref<10x10xf32> 20 %cij = load %C[%arg3, %arg4] : memref<10x10xf32> 23 store %co, %C[%arg3, %arg4] : memref<10x10xf32> 32 return %C : memref<10x10xf32> 45 // CHECK-NEXT: %{{.*}} = load %{{.*}}[%{{.*}}, %{{.*}}] : memref<10x10xf32> 46 // CHECK-NEXT: %{{.*}} = load %{{.*}}[%{{.*}}, %{{.*}}] : memref<10x10xf32> 47 // CHECK-NEXT: %{{.*}} = load %{{.*}}[%{{.*}}, %{{.*}}] : memref<10x10xf32> 50 // CHECK-NEXT: store %{{.*}}, %{{.*}}[%{{.*}}, %{{.*}}] : memref<10x10xf32> [all …]
|