/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/lib/Dialect/mhlo/transforms/ |
D | legalize_einsum_to_dot_general.cc | 35 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/ |
D | api_def_Einsum.pbtxt | 18 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/ |
D | einsum_op_test.py | 49 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/ |
D | hlo-legalize-einsum-to-dot-general.mlir | 1 // 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/ |
D | hlo-legalize-einsum-to-dot-general.mlir | 1 // 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/ |
D | einsum_op_test.py | 54 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/ |
D | xla_control_flow_ops_test.py | 53 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.
|
D | math_test.py | 780 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/ |
D | special_math_ops_test.py | 647 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 …]
|
D | special_math_ops.py | 619 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))
|
D | linalg_grad.py | 216 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/ |
D | opt_einsum.BUILD | 2 # opt_einsum is a library for optimizing tensor contraction order for einsum.
|
/external/tensorflow/tensorflow/lite/testing/op_tests/ |
D | einsum.py | 71 out = tf.einsum(equation, input0_tensor, input1_tensor)
|
/external/tensorflow/tensorflow/lite/experimental/mlir/testing/op_tests/ |
D | einsum.py | 67 out = tf.einsum(equation, input0_tensor, input1_tensor)
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/ |
D | batchmatmul_to_einsum.mlir | 1 // RUN: tf-opt %s -tf-batch-matmul-to-tf-einsum | FileCheck %s
|
/external/tensorflow/tensorflow/dtensor/mlir/expansions/ |
D | einsum_spmd_expander.cc | 395 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/ |
D | mhlo_passes.td | 67 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/ |
D | tpu_test.py | 217 return special_math_ops.einsum("abc,acd->abd", a, b)
|
/external/tensorflow/tensorflow/lite/experimental/mlir/testing/ |
D | build_def.bzl | 42 "einsum",
|
D | generate_examples.py | 45 from tensorflow.lite.experimental.mlir.testing.op_tests.einsum import make_einsum_tests
|
/external/tensorflow/tensorflow/lite/python/ |
D | analyzer_test.py | 215 return tf.einsum('ABD,DNH->ABNH', lhs, rhs)
|
/external/tensorflow/tensorflow/lite/testing/ |
D | build_def.bzl | 52 "einsum", 226 "einsum",
|
/external/tensorflow/tensorflow/lite/g3doc/examples/convert/ |
D | operation_fusion.md | 21 [tf.einsum](https://www.tensorflow.org/api_docs/python/tf/einsum). A primitive
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.linalg.pbtxt | 148 name: "einsum"
|
/external/tensorflow/tensorflow/tools/api/golden/v1/ |
D | tensorflow.linalg.pbtxt | 136 name: "einsum"
|