Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 83 for getDefiningOp (0.3 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc

        if (operands.size() != 1) return failure();
        int weight_operand_idx = *operands.begin();
    
        Operation* weight_op = op.getOperand(weight_operand_idx).getDefiningOp();
        DenseFPElementsAttr attr;
        if (!matchPattern(weight_op->getResult(0), m_Constant(&attr))) {
          return failure();
        }
    
        // Get new shape.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_cluster_formation.cc

                                     : ValueRange(inner_op->getResults());
        llvm::SmallVector<Operation*, 4> candidates;
        for (Value value : values) {
          if (incoming) {
            candidates = {value.getDefiningOp()};
          } else {
            candidates.assign(value.getUsers().begin(), value.getUsers().end());
          }
          for (Operation* candidate_op : candidates) {
            if (cluster_ops.contains(candidate_op) ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 22:03:30 UTC 2024
    - 39.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

        Operation* def = cluster_operand.getDefiningOp();
        // This pass assumes that a TPUPartitionedInputV2 is preceeded by
        // ReadVariable ops, and not vice versa. An earlier pass,
        // TPUResourceReadsWritesPartitioning, should have ensured this
        // precondition.
        if (!def) continue;
        for (auto operand : def->getOperands()) {
          Operation* def_of_read = operand.getDefiningOp();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

    //===----------------------------------------------------------------------===//
    
    LogicalResult NextIterationSinkOp::verify() {
      NextIterationSinkOp sink = *this;
      Value token = sink.getToken();
      Operation *definingOp = token.getDefiningOp();
      if (!definingOp)
        return sink.emitOpError() << "expects a token directly produced by a "
                                     "tf_executor.NextIteration.Source op: ";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/quantization/quantization_context.cc

        auto ele = op->getOperand(i).getType().cast<ShapedType>().getElementType();
        if (ele.isa<FloatType>() && SetOperandParams(op, i, params)) {
          *changed |= true;
          new_items->push_back(op->getOperand(i).getDefiningOp());
        }
      }
    
      // Use the final state to set all the results' parameters.
      for (int res = 0, e = op->getNumResults(); res != e; ++res) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 08 01:38:03 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_ops.cc

      op->replaceAllUsesWith(flex_op);
      op->erase();
      return true;
    }
    
    // Sets the "no_fallback" attribute.
    Value SetNoFallbackAttr(PatternRewriter &rewriter, Value val) {
      val.getDefiningOp()->setAttr(kNoFallbackAttr, rewriter.getUnitAttr());
      return val;
    }
    
    // Returns true if the attr is a float attribute and be equal to value.
    static bool FloatValueEquals(const Attribute &attr, double value) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc

    }
    
    Attribute GetQuantizationAxis(PatternRewriter& rewriter, Operation* op,
                                  const int operand_index) {
      auto* defining_op = op->getOperand(operand_index).getDefiningOp();
      for (auto attr : kQuantizationAxisAttrs) {
        if (defining_op->hasAttr(attr)) {
          return defining_op->getAttr(attr);
        }
      }
      // Not found.
      return rewriter.getI64IntegerAttr(-1);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/cluster_tf_ops_pass.cc

              func_metadata.inputs.push_back(value);
              func_metadata.input_devices.push_back(value_device);
            }
            continue;
          }
    
          Operation *defining_op = value.getDefiningOp();
          std::string defining_op_host = GetHost(defining_op);
          FunctionMetadata &defining_func_metadata = metadatas[defining_op_host];
    
          if (StringAttr attr =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/duplicate_shape_determining_constants.cc

        OpOperand* curr_operand = duplication_targets[target_idx];
        target_idx++;
    
        Operation* owning_op = curr_operand->getOwner();
        Operation* defining_op = curr_operand->get().getDefiningOp();
    
        if (llvm::isa_and_nonnull<TF::ConstOp>(defining_op)) {
          // No need to clone if this is the only use.
          if (defining_op->hasOneUse()) {
            LLVM_DEBUG(llvm::dbgs()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

            return true;
          }
    
          for (int qi : quantizable_indices) {
            auto const_op = llvm::dyn_cast_or_null<arith::ConstantOp>(
                op->getOperand(qi).getDefiningOp());
            if (!const_op) {
              continue;
            }
    
            DenseFPElementsAttr attr;
            if (!matchPattern(const_op->getResult(0), m_Constant(&attr))) {
              continue;
            }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
Back to top