Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 56 for identity_op (0.28 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc

      return value.getDefiningOp();
    }
    
    // TODO(b/158596585): Replace this with a cost model analysis.
    bool IsTrivialUnaryOperation(Operation* op) {
      return llvm::isa<TF::CastOp, TF::IdentityOp>(op);
    }
    
    // Adds outside compilation attributes to unary ops such as Identity/Cast ops
    // at the head of TPU computation that is used only by other outside compiled
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

    DatasetInput GetDatasetInput(Value value) {
      // TODO(haoliang): add an interface for DatasetOp to avoid the following
      // enumeration.
      // Iteratively tracing upwards if parent op is `IdentityOp` or `IdentityNOp`.
      while (
          llvm::isa_and_nonnull<IdentityOp, IdentityNOp>(value.getDefiningOp())) {
        value = value.getDefiningOp()->getOperand(
            mlir::cast<OpResult>(value).getResultNumber());
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/stack_ops_decomposition.cc

        llvm::StringMap<PartitionedCallStackOpsInfo>*
            decomposed_partitioned_call_callees) {
      for (auto& op : llvm::make_early_inc_range(block->getOperations())) {
        if (llvm::isa<TF::IdentityOp, TF::IdentityNOp>(&op)) {
          // Removes identity nodes in the block. The device computation does not
          // need such nodes to carry information.
          op.replaceAllUsesWith(op.getOperands());
          op.erase();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc

        Value value = nullptr;
        for (auto v : op.getComponents()) {
          value = v;
        }
        if (!value) return failure();
        rewriter.replaceOpWithNewOp<TF::IdentityOp>(op, value.getType(), value);
        return success();
      }
    };
    
    class HandleOptionalGet : public OpRewritePattern<TF::OptionalGetValueOp> {
     public:
      using OpRewritePattern::OpRewritePattern;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/build_xla_ops_pass.cc

      // defeat the purpose of adding this indirection.
      ops::IdentityN identity_n(root.WithOpName("int32_id_n"), int32_inputs);
      root.graph()->AddControlEdge(predicate_as_control.node(),
                                   identity_n.operation.node());
    
      for (int i = 0, end = int32_inputs.size(); i < end; i++) {
        TF_RETURN_IF_ERROR(root.graph()->UpdateEdge(identity_n[i].node(), i, n,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 24.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/prepare_patterns.td

      [(IsReshapeEquivalentToTranspose $transpose_out1, $output),
       (AnyStaticShapeTensor $input),
       (AnyStaticShapeTensor $output),
       (HasOneUse $transpose_out1)]>;
    
    // Partially supported in TFLite, treated as passthrough IdentityOp
    def ConvertCheckNumerics : Pat<(TF_CheckNumericsOp $arg, $msg), (TF_IdentityOp $arg)>;
    def ConvertSnapshot : Pat<(TF_SnapshotOp $arg), (TF_IdentityOp $arg)>;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_weights.cc

        for (const auto& user : op.getUsers()) {
          if (user->template hasTrait<OpTrait::IsTerminator>()) return true;
          if (auto next_user = dyn_cast_or_null<TF::IdentityOp>(user)) {
            return (*(next_user->getResult(0).getUsers().begin()))
                ->template hasTrait<OpTrait::IsTerminator>();
          }
        }
        return false;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

      rewriter.setInsertionPointAfter(op);
      auto const_op =
          rewriter.create<TF::ConstOp>(op.getLoc(), new_type, tensor_proto_attr);
      auto new_identity_op = rewriter.create<TF::IdentityOp>(
          op->getLoc(), const_op.getType(), const_op);
      return new_identity_op.getResult();
    }
    
    Operation* LogicsForUniformDequanization(PatternRewriter& rewriter,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold_test.cc

      Operation* op_to_fold = FindOperationOfType<TF::MulOp>(test_func);
      SmallVector<Value> results = ConstantFoldOpIfPossible(op_to_fold);
      EXPECT_THAT(results, SizeIs(1));
      // No constant-folding since the IdentityOp has `TF_NoConstantFold` trait.
      auto mul_op = dyn_cast_or_null<TF::MulOp>(results[0].getDefiningOp());
      EXPECT_THAT(mul_op, NotNull());
      // Even though the preceding CastOp is foldable, it shouldn't be folded since
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 04 07:19:09 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

              next_values_to_visit.push_back(
                  while_op.getBody().front().getArgument(operand_number));
              continue;
            }
    
            if (llvm::isa<mlir::TF::IdentityOp, mlir::TF::CastOp,
                          mlir::TF::ReadVariableOp>(owner)) {
              next_values_to_visit.push_back(use.getOwner()->getResult(0));
              continue;
            }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
Back to top