Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for _einsum (0.48 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/python/integration_test/quantize_model_test_base.py

              ]
          )
          def einsum_without_kernel(
              self, x: core.Tensor, y: core.Tensor
          ) -> Mapping[str, core.Tensor]:
            return self._einsum(x, y)
    
          def _einsum(self, x, y):
    
            out = tensorflow.einsum(equation, x, y)
            if self._bias is not None:
              out = nn_ops.bias_add(out, self._bias)
            return {'output': out}
    
        model = EinsumModel()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/tests/einsum.mlir

    // RUN: tf-opt -split-input-file -verify-diagnostics -tf-einsum %s | FileCheck %s
    
    func.func @unary_einsum_reduce_sum_transpose(%arg0: tensor<3x4x5x6xf32>) -> tensor<3x5x4xf32> {
      %0 = "tf.Einsum"(%arg0) {T = "tfdtype$DT_FLOAT", equation = "...gse->...sg"}: (tensor<3x4x5x6xf32>) -> tensor<3x5x4xf32>
      func.return %0 : tensor<3x5x4xf32>
      // CHECK-LABEL: unary_einsum_reduce_sum_transpose
      // CHECK-DAG: %[[cst:.*]] = arith.constant dense<3> : tensor<1xi32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jan 05 18:35:42 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc

    }
    
    struct EinsumDimensionNumbers {
      // Each field contains the list of dimensions appearing only in the specifed
      // arguments of the einsum op with natural ordering. For example `rhs_out`
      // contains the dimensions appearing in the RHS and the OUTPUT of the einsum
      // but not in the LHS.
      std::vector<int64_t> lhs;
      std::vector<int64_t> rhs;
      std::vector<std::tuple<int64_t, int64_t>> lhs_rhs;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  4. tensorflow/cc/gradients/linalg_grad.cc

      // Claim: For the einsum operation z = einsum("{eq_x},{eq_y}->{eq_z}", x, y),
      //   where the equation involves only Tensor contractions, generalized traces
      //   and transposes, the input gradients are given by the vector-jacobian
      //   products (VJPs):
      //
      //     grad_wrt_x = einsum("{eq_y},{eq_z}->{eq_x}", y, grad_wrt_z)
      //     grad_wrt_y = einsum("{eq_x},{eq_z}->{eq_y}", x, grad_wrt_z}
      //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 07 23:11:54 UTC 2022
    - 20.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.td

      [], (addBenefit 10)>;
    
    // Converts inlined Einsum pattern to TF XlaDotV2 op.
    def ConvertTFEinsumToXLADotV2Op : Pat<
      (TF_EinsumOp:$einsum
        $args, $equation),
      (CreateXlaDotV2OpFromTfEinsumOp
        $equation, $args, $einsum),
      [(IsInt32ElementType $einsum),
       // Constraint to check:
       // 1. The einsum has two inputs and one output.
       // 2. The einsum is not created by the convert function itself.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Dec 10 05:52:02 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc

      if (!value_type.hasRank()) return false;
      if (!value_type.getElementType().isInteger(integer_width)) return false;
    
      return true;
    }
    
    // Constraint to check:
    // 1. The einsum has two inputs and one output.
    // 2. The einsum is not created by the convert function itself.
    // 3. Both inputs are int32 tensor.
    // 4. Both inputs have the graph ancestor of either const-(sub), or cast-sub.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc

          }
    
          if (!is_weight_constant) {
            if (!function_name.contains("matmul") &&
                !function_name.contains("einsum")) {
              return absl::InternalError(
                  "Non-constant weights are not supported at the moment,"
                  " except matmul and einsum.");
            } else if (!quant_options_.enable_two_input_tensors() &&
                       !is_unitwise_quantization_enabled) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc

    #include "tensorflow/compiler/mlir/quantization/tensorflow/quantization_options.pb.h"
    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.h"
    #include "tensorflow/compiler/mlir/tensorflow/transforms/einsum.h"
    
    namespace mlir {
    namespace quant {
    namespace {
    
    using ::tensorflow::quantization::OpSet;
    
    class PrepareLiftingPass
        : public PassWrapper<PrepareLiftingPass, OperationPass<func::FuncOp>> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantized_function_library.mlir

        func.return %5 : tensor<*xi32>
      }
    
       // Einsum with int32 accumulation.
      func.func private @internal_einsum_fn(
                             %input : tensor<*xi8>, %weight : tensor<*xi8>,
                             %input_scale : tensor<*xf32>, %input_zp : tensor<*xi32>,
                             %weight_scale : tensor<*xf32>, %weight_zp : tensor<*xi32>) -> tensor<*xi32> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jan 08 01:16:10 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  10. requirements_lock_3_12.txt

        # via
        #   -r requirements.in
        #   h5py
        #   jax
        #   keras-nightly
        #   ml-dtypes
        #   opt-einsum
        #   scipy
        #   tb-nightly
    opt-einsum==3.3.0 \
        --hash=sha256:2455e59e3947d3c275477df7f5205b30635e266fe6dc300e3d9f9646bfcea147 \
        --hash=sha256:59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549
        # via
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 19:00:33 UTC 2024
    - 43.2K bytes
    - Viewed (0)
Back to top