Skip to content

Commit 3ea52d3

Browse files
abatterytensorflower-gardener
authored andcommitted
Add tf.Cholesky and tf.MatrixTriangularSolve to Flex
closes tensorflow#46577 PiperOrigin-RevId: 353135213 Change-Id: I27d78947b070d2ec64820f473466870e71745bfc
1 parent 4dc6870 commit 3ea52d3

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

tensorflow/core/kernels/BUILD

+4
Original file line numberDiff line numberDiff line change
@@ -5974,6 +5974,7 @@ filegroup(
59745974
"//tensorflow/core/kernels/linalg:linalg_ops_common.h",
59755975
"//tensorflow/core/kernels/linalg:matrix_diag_op.h",
59765976
"//tensorflow/core/kernels/linalg:matrix_set_diag_op.h",
5977+
"//tensorflow/core/kernels/linalg:matrix_triangular_solve_op_impl.h",
59775978
"//tensorflow/core/util:image_resizer_state.h",
59785979
],
59795980
)
@@ -6280,9 +6281,12 @@ filegroup(
62806281
"//tensorflow/core/kernels/image:resize_nearest_neighbor_op.cc",
62816282
"//tensorflow/core/kernels/image:sample_distorted_bounding_box_op.cc",
62826283
"//tensorflow/core/kernels/linalg:linalg_ops_common.cc",
6284+
"//tensorflow/core/kernels/linalg:cholesky_op.cc",
62836285
"//tensorflow/core/kernels/linalg:matrix_diag_op.cc",
62846286
"//tensorflow/core/kernels/linalg:matrix_inverse_op.cc",
62856287
"//tensorflow/core/kernels/linalg:matrix_set_diag_op.cc",
6288+
"//tensorflow/core/kernels/linalg:matrix_triangular_solve_op_complex.cc",
6289+
"//tensorflow/core/kernels/linalg:matrix_triangular_solve_op_real.cc",
62866290
],
62876291
)
62886292

tensorflow/core/kernels/linalg/BUILD

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ package_group(
3434

3535
# Export a few files for use on Android.
3636
exports_files([
37+
"cholesky_op.cc",
3738
"einsum_op_impl_half.cc",
3839
"einsum_op_impl_bfloat16.cc",
3940
"einsum_op_impl_int32.cc",
@@ -51,6 +52,9 @@ exports_files([
5152
"matrix_inverse_op.cc",
5253
"matrix_set_diag_op.h",
5354
"matrix_set_diag_op.cc",
55+
"matrix_triangular_solve_op_complex.cc",
56+
"matrix_triangular_solve_op_impl.h",
57+
"matrix_triangular_solve_op_real.cc",
5458
])
5559

5660
# Public support libraries ----------------------------------------------------

tensorflow/lite/delegates/flex/allowlisted_flex_ops.cc

+4
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ const std::set<std::string>& GetFlexAllowlist() {
6767
"AvgPool3D",
6868
"AvgPool3DGrad",
6969
"AvgPoolGrad",
70+
"BatchCholesky",
7071
"BatchMatMul",
7172
"BatchMatMulV2",
7273
"BatchMatrixDiag",
7374
"BatchMatrixDiagPart",
7475
"BatchMatrixInverse",
7576
"BatchMatrixSetDiag",
77+
"BatchMatrixTriangularSolve",
7678
"BatchNormWithGlobalNormalization",
7779
"BatchNormWithGlobalNormalizationGrad",
7880
"BatchToSpace",
@@ -104,6 +106,7 @@ const std::set<std::string>& GetFlexAllowlist() {
104106
"Ceil",
105107
"CheckNumerics",
106108
"CheckNumericsV2",
109+
"Cholesky",
107110
"CombinedNonMaxSuppression",
108111
"Complex",
109112
"ComplexAbs",
@@ -264,6 +267,7 @@ const std::set<std::string>& GetFlexAllowlist() {
264267
"MatrixSetDiag",
265268
"MatrixSetDiagV2",
266269
"MatrixSetDiagV3",
270+
"MatrixTriangularSolve",
267271
"Max",
268272
"MaxPool",
269273
"MaxPool3D",

0 commit comments

Comments
 (0)