blob: c7ea0f9637ed52e2cb11b20c012fe027856e4b77 [file] [log] [blame]
// RUN: tf-mlir-translate -hlo-text-to-mlir-hlo %s -o - | FileCheck %s
HloModule foo
// CHECK-LABEL: func @call(%arg0: tensor<i64>) -> tensor<i64> {
%call (arg_1: s64[]) -> s64[] {
%arg_1 = s64[] parameter(0), metadata={op_name="XLA_Args"}
// CHECK-NEXT: %0 = "xla.add"(%arg0, %arg0) {name = "compare.2"} : (tensor<i64>, tensor<i64>) -> tensor<i64>
// CHECK-NEXT: return %0 : tensor<i64>
ROOT %compare.2 = s64[] add(%arg_1, %arg_1), metadata={op_type="Less" op_name="Less"}
}
// CHECK-LABEL: func @main(%arg0: tensor<i64>) -> tensor<i64> {
ENTRY %foo (arg0.1: s64[]) -> s64[] {
%arg0.1 = s64[] parameter(0), metadata={op_name="XLA_Args"}
// CHECK-NEXT: %0 = call @call(%arg0) : (tensor<i64>) -> tensor<i64>
// CHECK-NEXT: return %0 : tensor<i64>
ROOT %call.2 = s64[] call(%arg0.1), to_apply=%call
}