20 lines · plain
1// RUN: mlir-opt %s -inline | FileCheck %s2 3// Verifies that regions with operations from the ml_program dialect can4// be inlined.5 6ml_program.global private @global(dense<4> : tensor<4xi32>) : tensor<4xi32>7 8// CHECK: @inline_into9func.func @inline_into() -> tensor<4xi32> {10 // CHECK-NOT: @inline_from11 // CHECK: ml_program.global_load_const12 %0 = call @inline_from() : () -> tensor<4xi32>13 return %0 : tensor<4xi32>14}15 16func.func @inline_from() -> tensor<4xi32> {17 %0 = ml_program.global_load_const @global : tensor<4xi32>18 return %0 : tensor<4xi32>19}20