Create an xla_hlo_client dialect and copy the binary elementwise ops into it.
* This is a first step towards:
1. Moving all client-influenced ops to the client dialect.
2. Defining dynamic shape aware conversion patterns for lowering from xla_hlo_client -> xla_hlo.
3. Removing the implicit and rank broadcasting support from the xla_hlo ops.
4. Redirecting frontend (tf2xla bridge code) to emit into xla_hlo_client and backend code to emit from xla_hlo with client carve-outs removed
PiperOrigin-RevId: 300803394
diff --git a/build_tools/third_party/tensorflow/tensorflow/compiler/mlir/xla/CMakeLists.txt b/build_tools/third_party/tensorflow/tensorflow/compiler/mlir/xla/CMakeLists.txt
index 4543971..6e62fc2 100644
--- a/build_tools/third_party/tensorflow/tensorflow/compiler/mlir/xla/CMakeLists.txt
+++ b/build_tools/third_party/tensorflow/tensorflow/compiler/mlir/xla/CMakeLists.txt
@@ -35,6 +35,7 @@
SRCS
"convert_op_folder.cc"
"ir/dialect_registration.cc"
+ "ir/hlo_client_ops.cc"
"ir/hlo_ops.cc"
"ir/hlo_utils.cc"
"ir/lhlo_ops.cc"
@@ -46,6 +47,7 @@
"transforms/xla_legalize_to_linalg.cc"
HDRS
"convert_op_folder.h"
+ "ir/hlo_client_ops.h"
"ir/hlo_ops.h"
"ir/hlo_utils.h"
"ir/lhlo_ops.h"
@@ -62,6 +64,7 @@
absl::flat_hash_set
tensorflow_mlir_xla_canonicalize_gen
tensorflow_mlir_xla_hlo_ops_gen
+ tensorflow_mlir_xla_hlo_client_ops_gen
tensorflow_mlir_xla_hlo_ops_base_gen
tensorflow_mlir_xla_legalize_to_standard_patterns_gen
tensorflow_mlir_xla_lhlo_ops_gen
@@ -111,6 +114,22 @@
PACKAGE
tensorflow
NAME
+ mlir_xla_hlo_client_ops_gen
+ TBLGEN
+ MLIR
+ ROOT
+ ${TF_MLIR_XLA_SRC_ROOT}
+ SRCS
+ "ir/hlo_client_ops.td"
+ OUTS
+ -gen-op-decls ir/hlo_client_ops.h.inc
+ -gen-op-defs ir/hlo_client_ops.cc.inc
+)
+
+external_tablegen_library(
+ PACKAGE
+ tensorflow
+ NAME
mlir_xla_hlo_ops_base_gen
TBLGEN
MLIR