Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 26 for identity_op (0.32 sec)

  1. tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.h

      auto is_valid_broadcasting = [](ShapedType operand_ty, ShapedType identity_ty,
                                      ShapedType result_ty) -> bool {
        // Scalar identity is broadcastable to any operand shape, we only need to
        // check that operand has the same shape as a result.
        bool scalar_identity = identity_ty.hasRank() && identity_ty.getRank() == 0;
        if (scalar_identity) return operand_ty == result_ty;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfrt/tests/ifrt/tf_identity_propagation.mlir

      %0 = "tf.Identity"(%arg0) {_XlaSharding = ""} : (tensor<i32>) -> tensor<i32>
      // CHECK: return %[[OUTPUT]]
      func.return %0 : tensor<i32>
    }
    
    // CHECK-LABEL: func @identity_n
    // CHECK-SAME:    (%[[ARG0:.*]]: tensor<i32>, %[[ARG1:.*]]: tensor<f32>)
    func.func @identity_n(%arg0: tensor<i32>, %arg1: tensor<f32>) -> (tensor<i32>, tensor<f32>) {
      // CHECK-NOT: "tf.IdentityN"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Mar 23 23:34:42 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/annotate_parameter_replication.cc

      void runOnOperation() override;
    };
    
    // Returns the first value in the chain of operands, which is not defined by a
    // tf.IdentityOp or a tf.ReadVariableOp.
    Value SkipIdentityAndReadVariable(Value v) {
      while (auto op = v.getDefiningOp()) {
        if (!isa<TF::IdentityOp, TF::ReadVariableOp>(op)) break;
        v = op->getOperand(0);
      }
      return v;
    }
    
    void AnnotateParameterReplicationPass::runOnOperation() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

        DenseFPElementsAttr min_value, max_value;
        if (auto id1 = dyn_cast_or_null<TF::IdentityOp>(min.getDefiningOp())) {
          id1.replaceAllUsesWith(id1.getInput());
          min = tf_op.getMin();
          rewriter.eraseOp(id1);
        }
        if (auto id2 = dyn_cast_or_null<TF::IdentityOp>(max.getDefiningOp())) {
          id2.replaceAllUsesWith(id2.getInput());
          max = tf_op.getMax();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h

                      AttrType &max_value) const {
        Value min = tf_op.getMin(), max = tf_op.getMax();
        if (auto min_id = min.getDefiningOp<TF::IdentityOp>()) {
          min = min_id.getInput();
        }
        if (auto max_id = max.getDefiningOp<TF::IdentityOp>()) {
          max = max_id.getInput();
        }
    
        if (!matchPattern(min, m_Constant(&min_value))) {
          return false;
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/remove_identity_op_pattern.cc

    #include "mlir/Transforms/GreedyPatternRewriteDriver.h"  // from @llvm-project
    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.h"
    
    namespace mlir {
    namespace quant {
    
    LogicalResult RemoveIdentity::matchAndRewrite(TF::IdentityOp identity,
                                                  PatternRewriter &rewriter) const {
      for (Operation *user : identity->getUsers()) {
        // Replace the op with the input if output is only used by TF ops.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 15 06:13:49 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_patterns.td

    class RankEquals<string rank> : Constraint<CPred<
      "RankEquals($0, " # rank # ")">>;
    
    def IsFusibleWithBias : Constraint<CPred<
      "IsFusibleWithBiasOp($0.getDefiningOp())">>;
    
    // Folds TF IdentityOp with constant input.
    def RemoveConstIdentityOp : Pat<
      (TF_IdentityOp (TF_ConstOp $input)),
      (TF_ConstOp $input)>;
    
    // Standardizes the Max and Min ops by moving constant value to rhs. This will
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 29 21:02:21 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/tests/tpu_colocate_composite_resource_ops.mlir

        n = 2 : i32} {
         // CHECK:      %[[IDENTITY_OUT:.*]] = "tf.Identity"(%[[RI_0]])
         // CHECK:      %[[RESOURCE_OUT:.*]] = "tf_device.launch"()
         // CHECK-SAME: TPU_REPLICATED_CORE_0
         // CHECK-NEXT:   %[[READ_OUT:.*]] = "tf.ReadVariableOp"(%[[IDENTITY_OUT]])
         // CHECK-NEXT:   tf_device.return %[[READ_OUT]]
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 31 08:59:10 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tfr/integration/node_expansion_pass.cc

      // isn't a composite op. The following ops are explicitly skipped here because
      // their "no-op" expansion is known to cause problems in some cases.
      static const char* kOpsToSkip[] = {
          "IdentityOp",
          "NoOp",              // b/174596063
          "OptionalHasValue",  // b/173136483
          "OptionalGetValue",  // b/173136483
          "VarHandleOp",       // b/176819198
      };
      for (const char* skip : kOpsToSkip) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Feb 25 16:22:36 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/multi_arguments_results_v1.py

    # CHECK: return %[[IDENTITY]]#1, %[[IDENTITY]]#0
    
    
    def Test():
    
      x = tf.constant(1.0, shape=(5, 3))
      y = tf.constant(1.0, shape=(3, 5))
    
      s = tf.matmul(x, y)
      t = tf.matmul(y, x)
      [t, s] = array_ops.identity_n([t, s])
    
      tensor_info_x = tf.compat.v1.saved_model.utils.build_tensor_info(x)
      tensor_info_y = tf.compat.v1.saved_model.utils.build_tensor_info(y)
      tensor_info_s = tf.compat.v1.saved_model.utils.build_tensor_info(s)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 28 21:37:05 UTC 2021
    - 3.5K bytes
    - Viewed (0)
Back to top