Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 47 for identity_op (0.35 sec)

  1. 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)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

            decomposed_partitioned_call_callees) {
      for (auto& op : llvm::make_early_inc_range(block->getOperations())) {
        // TODO(yuanzx): Add a pass to remove identities in device computation.
        if (llvm::isa<TF::IdentityOp, TF::IdentityNOp, TF::StopGradientOp>(&op)) {
          op.replaceAllUsesWith(op.getOperands());
          op.erase();
        } else if (auto list = llvm::dyn_cast<TF::EmptyTensorListOp>(&op)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting_cleanup.cc

    // such nodes to carry information.
    void RemovePassthroughOp(Block &block) {
      for (auto &op : llvm::make_early_inc_range(block)) {
        if (isa<TF::IdentityOp, TF::IdentityNOp>(op) || IsCastOfResource(op)) {
          op.replaceAllUsesWith(op.getOperands());
          op.erase();
        }
      }
    }
    
    using LocalVarOp = std::variant<TF::VarHandleOp, TF::MlirLocalVarOp>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

      while (auto result = mlir::dyn_cast<OpResult>(v)) {
        if (!(allow_other_use || v.hasOneUse())) break;
        auto op = result.getDefiningOp();
        if (!llvm::isa<TF::IdentityOp, TF::IdentityNOp>(op)) {
          break;
        }
        v = op->getOperand(result.getResultNumber());
        if (skipped) skipped->insert(op);
      }
      return v;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/transforms/legalization_op_config.cc

        TypeID::get<TF::_FusedConv2DOp>(),
        TypeID::get<TF::GatherNdOp>(),
        TypeID::get<TF::GatherV2Op>(),
        TypeID::get<TF::GreaterEqualOp>(),
        TypeID::get<TF::IdentityOp>(),
        TypeID::get<TF::IdentityNOp>(),
        TypeID::get<TF::InplaceUpdateOp>(),
        TypeID::get<TF::InvertPermutationOp>(),
        TypeID::get<TF::IRFFTOp>(),
        TypeID::get<TF::L2LossOp>(),
        TypeID::get<TF::LegacyCallOp>(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 04:08:35 UTC 2024
    - 21.7K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top