Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 178 for getDefiningOp (0.27 sec)

  1. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

    template <typename T = Operation*>
    Operation* FindOperandOfType(Operation* op) {
      for (Value operand_value : op->getOperands()) {
        if (isa<T>(operand_value.getDefiningOp())) {
          return operand_value.getDefiningOp();
        }
      }
      return nullptr;
    }
    
    // Returns the function attribute for the given call op which is lifted for
    // quantization.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/annotate_parameter_replication.cc

    };
    
    // 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() {
      ModuleOp m = getOperation();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/ir/tf_traits.h

      // which is cyclical.
      return success();
    }
    
    inline OpFoldResult foldIdempotent(Operation* op) {
      if (op->getNumOperands() == 1) {
        auto* argumentOp = op->getOperand(0).getDefiningOp();
        if (argumentOp && op->getName() == argumentOp->getName()) {
          // Replace the outer operation output with the inner operation.
          return op->getOperand(0);
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc

                  extern_value.getDefiningOp())) {
            extern_values.insert(extern_value);
            continue;
          }
          // Add constant at start of region.
          auto const_builder =
              OpBuilder(&it.value()->front(), it.value()->front().begin());
          auto const_value = const_builder.clone(*extern_value.getDefiningOp());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_custom_aggregation_ops.cc

            if (!element_type.isF32()) {
              continue;
            }
    
            // Skip when there is any already existing CustomAggregatorOp found.
            Operation *defining_op = input.get().getDefiningOp();
            if (dyn_cast_or_null<TF::CustomAggregatorOp>(defining_op)) {
              continue;
            }
    
            // Skip calibration when the given operand comes from a constant.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc

            !result_type || !result_type.getElementType().isSignlessInteger(8)) {
          return failure();
        }
    
        auto input_op =
            dyn_cast<arith::ConstantOp>(op.getOperand(0).getDefiningOp());
        if (!input_op) {
          return failure();
        }
    
        Builder builder(op.getContext());
        auto new_gather_op = rewriter.create<TFL::GatherOp>(
            op.getLoc(),
            /*result=*/
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/remove_unused_while_results.cc

      Value cond_block_argument = cond_block.getArgument(idx);
      // Consider the op that defines the unused result as a candidate for pruning.
      Operation* candidate_op = body_yield_operand.getDefiningOp();
      if (candidate_op == nullptr) return false;
    
      // Don't prune if candidate op might have side effects.
      if (isa_and_nonnull<TF::TensorFlowDialect>(candidate_op->getDialect())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Nov 16 01:49:07 UTC 2022
    - 5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_head_tail_outside_compilation.cc

           llvm::zip(cluster_terminator->getOperands(), cluster.getResults())) {
        Value cluster_terminator_operand = std::get<0>(result);
        if (cluster_terminator_operand.getDefiningOp() &&
            cluster.getOperation()->isProperAncestor(
                cluster_terminator_operand.getDefiningOp())) {
          new_cluster_results.push_back(cluster_terminator_operand);
          new_cluster_result_types.push_back(cluster_terminator_operand.getType());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

      // We need to make sure both splits & split dim are constants.
      auto splits = splitv_op.getSizeSplits().getDefiningOp();
      mlir::DenseIntElementsAttr splits_attr;
      if (!splits || !matchPattern(splits, m_Constant(&splits_attr)))
        return failure();
    
      auto split_dim = splitv_op.getSplitDim().getDefiningOp();
      mlir::ElementsAttr split_dim_attr;
      if (!split_dim || !matchPattern(split_dim, m_Constant(&split_dim_attr)))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/quantization/ir/ConvertConst.cc

      }
    
      // When creating the new const op, use a fused location that combines the
      // original const and the qbarrier that led to the quantization.
      auto fusedLoc = rewriter.getFusedLoc(
          {qbarrier.getArg().getDefiningOp()->getLoc(), qbarrier.getLoc()});
      auto newConstOp = rewriter.create<arith::ConstantOp>(
          fusedLoc, newConstValueType, cast<TypedAttr>(newConstValue));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
Back to top