Adds the initial version of tools to convert between HLO protos and the XLA dialect. Co-authored-by: Robert Suderman <suderman@google.com> Co-authored-by: Geoffrey Martin-Noble <gcmn@google.com> Co-authored-by: River Riddle <riverriddle@google.com> Co-authored-by: Lei Zhang <antiagainst@google.com> Co-authored-by: Himabindu Pucha <hpucha@google.com> PiperOrigin-RevId: 258691517
17 lines
608 B
Plaintext
17 lines
608 B
Plaintext
// RUN: tf-mlir-translate -hlo-text-to-mlir-hlo %s -o - | FileCheck %s
|
|
|
|
HloModule main.5
|
|
|
|
// CHECK-LABEL: func @main() -> tensor<4xf32> {
|
|
ENTRY %iota.1 () -> f32[4] {
|
|
// CHECK-NEXT: %0 = "xla.iota"() {iota_dimension = 0 : i64} : () -> tensor<4xf32>
|
|
// CHECK-NEXT: return %0 : tensor<4xf32>
|
|
ROOT %iota.0 = f32[4] iota(), iota_dimension=0
|
|
}
|
|
|
|
// CHECK-LABEL: func @iota.2() -> tensor<4x5xf32> {
|
|
%iota.2 () -> f32[4, 5] {
|
|
// CHECK-NEXT: %0 = "xla.iota"() {iota_dimension = 1 : i64} : () -> tensor<4x5xf32>
|
|
// CHECK-NEXT: return %0 : tensor<4x5xf32>
|
|
ROOT %iota.0 = f32[4, 5] iota(), iota_dimension=1
|
|
} |