Home
last modified time | relevance | path

Searched refs:einsum (Results 1 – 25 of 51) sorted by relevance

123

/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/lib/Dialect/mhlo/transforms/
Dlegalize_einsum_to_dot_general.cc35 LogicalResult matchAndRewrite(EinsumOp einsum, in matchAndRewrite()
37 StringRef equation = einsum.einsum_config(); in matchAndRewrite()
59 return einsum.emitError("unexpected character ") in matchAndRewrite()
65 auto lhsType = einsum.lhs().getType().cast<RankedTensorType>(); in matchAndRewrite()
66 auto rhsType = einsum.rhs().getType().cast<RankedTensorType>(); in matchAndRewrite()
121 return rewriter.notifyMatchFailure(einsum, in matchAndRewrite()
133 einsum, "result token not found in operands"); in matchAndRewrite()
153 rewriter.create<DotGeneralOp>(einsum.getLoc(), dotGeneralResultType, in matchAndRewrite()
154 einsum.lhs(), einsum.rhs(), dimNumbers, in matchAndRewrite()
159 rewriter.replaceOp(einsum, ValueRange{dotGeneralOp}); in matchAndRewrite()
[all …]
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_Einsum.pbtxt18 String describing the Einstein Summation operation; in the format of np.einsum.
35 call `tf.einsum` directly. It is a hidden Op used by `tf.einsum`.
59 (d) Contraction: In case of binary einsum, axes corresponding to labels
70 Note: This operation is not supported by `np.einsum` or `tf.einsum`; it is
71 provided to enable computing the symbolic gradient of `tf.einsum`.
89 Similar to [`numpy.einsum`](https://docs.scipy.org/doc/numpy/reference/generated/numpy.einsum.html).
91 Comparison with `numpy.einsum`:
93 * This Op only supports unary and binary forms of `numpy.einsum`.
96 supported by `numpy.einsum`.
/external/tensorflow/tensorflow/python/kernel_tests/linalg/
Deinsum_op_test.py49 a = np.einsum(s, *inputs)
50 b = self.evaluate(gen_linalg_ops.einsum(input_tensors, s))
170 a = np.einsum(equation,
173 a = np.einsum(equation, *inputs)
175 b = self.evaluate(gen_linalg_ops.einsum(input_tensors, equation))
204 _ = self.evaluate(gen_linalg_ops.einsum(args[1:], args[0]))
210 _ = self.evaluate(gen_linalg_ops.einsum(placeholders, args[0]))
227 a = np.einsum(equation, *inputs)
228 b = self.evaluate(gen_linalg_ops.einsum(input_placeholders, equation))
246 b = self.evaluate(gen_linalg_ops.einsum([np.diag(a)], s))
[all …]
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/tests/Dialect/mhlo/
Dhlo-legalize-einsum-to-dot-general.mlir1 // RUN: mlir-hlo-opt -mhlo-legalize-einsum-to-dot-general %s -o - | FileCheck %s
5 …%1 = "mhlo.einsum"(%0, %arg0) {einsum_config = ",ii->i"} : (tensor<f32>, tensor<6x6xf32>) -> tenso…
14 // CHECK: "mhlo.einsum"
17 …%0 = "mhlo.einsum"(%arg0, %arg1) {einsum_config = "bxy,bijy->bijx"} : (tensor<8x2x6xf32>, tensor<8…
35 …%0 = "mhlo.einsum"(%arg0, %arg1) {einsum_config = "ij,jk->ik"} : (tensor<?x?xf32>, tensor<?x?xf32>…
48 …%0 = "mhlo.einsum"(%arg0, %arg1) {einsum_config = "ij,j->i"} : (tensor<?x?xf32>, tensor<?xf32>) ->…
61 …%0 = "mhlo.einsum"(%arg0, %arg1) {einsum_config = "i,i->"} : (tensor<?xf32>, tensor<?xf32>) -> ten…
/external/tensorflow/tensorflow/compiler/mlir/hlo/tests/
Dhlo-legalize-einsum-to-dot-general.mlir1 // RUN: mlir-hlo-opt -mhlo-legalize-einsum-to-dot-general %s -o - | FileCheck %s
5 …%1 = "mhlo.einsum"(%0, %arg0) {einsum_config = ",ii->i"} : (tensor<f32>, tensor<6x6xf32>) -> tenso…
20 …%0 = "mhlo.einsum"(%arg0, %arg1) {einsum_config = "bxy,bijy->bijx"} : (tensor<8x2x6xf32>, tensor<8…
35 …%0 = "mhlo.einsum"(%arg0, %arg1) {einsum_config = "ij,jk->ik"} : (tensor<?x?xf32>, tensor<?x?xf32>…
50 …%0 = "mhlo.einsum"(%arg0, %arg1) {einsum_config = "ij,j->i"} : (tensor<?x?xf32>, tensor<?xf32>) ->…
65 …%0 = "mhlo.einsum"(%arg0, %arg1) {einsum_config = "i,i->"} : (tensor<?xf32>, tensor<?xf32>) -> ten…
/external/tensorflow/tensorflow/compiler/tests/
Deinsum_op_test.py54 lambda x, y: special_math_ops.einsum('ij,jk->ik', x, y),
62 lambda x, y: special_math_ops.einsum('ijk,kji', x, y),
70 lambda x, y: special_math_ops.einsum('ij,j->', x, y),
78 lambda x: special_math_ops.einsum('ijk->kji', x),
/external/tensorflow/tensorflow/python/ops/parallel_for/
Dxla_control_flow_ops_test.py53 z1 = xla_ops.einsum(x_i, y, "ab,bc->ac")
54 z2 = xla_ops.einsum(x, y_i, "ab,bc->ac")
55 z3 = xla_ops.einsum(x, y, "ab,bc->ac")
56 z4 = xla_ops.einsum(x_i, y_i, "ab,bc->ac")
57 z5 = xla_ops.einsum(y_i, x_i, "cd,ce->de") # Includes transpose.
Dmath_test.py780 z0 = special_math_ops.einsum("ab->b", x_i)
781 z1 = special_math_ops.einsum("ab,bc->ac", x_i, y)
782 z2 = special_math_ops.einsum("ab,bc->ac", x, y_i)
783 z3 = special_math_ops.einsum("ab,bc->ac", x, y)
784 z4 = special_math_ops.einsum("ab,bc->ac", x_i, y_i)
785 z5 = special_math_ops.einsum("cd,ce->de", y_i, x_i) # Includes transpose.
/external/tensorflow/tensorflow/python/ops/
Dspecial_math_ops_test.py647 a = np.einsum(s, *inputs)
648 b = self.evaluate(special_math_ops.einsum(s, *input_tensors))
656 _ = special_math_ops.einsum(
793 a = np.einsum(equation, *inputs)
794 b = self.evaluate(special_math_ops.einsum(equation, *input_placeholders))
814 a = np.einsum(s, x, y, z)
815 b = self.evaluate(special_math_ops.einsum(s, x, y, z))
919 _ = special_math_ops.einsum(*args)
925 _ = self.evaluate(special_math_ops.einsum(args[0], *placeholders))
937 output = self.evaluate(special_math_ops.einsum(equation, *input_tensors))
[all …]
Dspecial_math_ops.py619 def einsum(equation, *inputs, **kwargs): function
1199 return gen_linalg_ops.einsum(inputs, resolved_equation)
1218 inputs.append(gen_linalg_ops.einsum(operands, binary_equation))
Dlinalg_grad.py216 return gen_linalg_ops.einsum([broadcasted_grad],
282 grad_reduced = gen_linalg_ops.einsum([output_grad, other_operand],
314 return gen_linalg_ops.einsum([grad],
/external/tensorflow/third_party/
Dopt_einsum.BUILD2 # opt_einsum is a library for optimizing tensor contraction order for einsum.
/external/tensorflow/tensorflow/lite/testing/op_tests/
Deinsum.py71 out = tf.einsum(equation, input0_tensor, input1_tensor)
/external/tensorflow/tensorflow/lite/experimental/mlir/testing/op_tests/
Deinsum.py67 out = tf.einsum(equation, input0_tensor, input1_tensor)
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/
Dbatchmatmul_to_einsum.mlir1 // RUN: tf-opt %s -tf-batch-matmul-to-tf-einsum | FileCheck %s
/external/tensorflow/tensorflow/dtensor/mlir/expansions/
Deinsum_spmd_expander.cc395 mlir::TF::EinsumOp einsum = mlir::cast<mlir::TF::EinsumOp>(op); in MaybeRelayoutInputs() local
400 TF_RETURN_IF_ERROR(ExtractEquationRelations(einsum.equation().str(), in MaybeRelayoutInputs()
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/include/mlir-hlo/Dialect/mhlo/transforms/
Dmhlo_passes.td67 def LegalizeEinsumToDotGeneralPass : Pass<"mhlo-legalize-einsum-to-dot-general", "func::FuncOp"> {
68 let summary = "Legalizes einsum ops to dot_general ops.";
/external/tensorflow/tensorflow/python/tpu/
Dtpu_test.py217 return special_math_ops.einsum("abc,acd->abd", a, b)
/external/tensorflow/tensorflow/lite/experimental/mlir/testing/
Dbuild_def.bzl42 "einsum",
Dgenerate_examples.py45 from tensorflow.lite.experimental.mlir.testing.op_tests.einsum import make_einsum_tests
/external/tensorflow/tensorflow/lite/python/
Danalyzer_test.py215 return tf.einsum('ABD,DNH->ABNH', lhs, rhs)
/external/tensorflow/tensorflow/lite/testing/
Dbuild_def.bzl52 "einsum",
226 "einsum",
/external/tensorflow/tensorflow/lite/g3doc/examples/convert/
Doperation_fusion.md21 [tf.einsum](https://www.tensorflow.org/api_docs/python/tf/einsum). A primitive
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.linalg.pbtxt148 name: "einsum"
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.linalg.pbtxt136 name: "einsum"

123