Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 76 for getDefiningOp (0.2 sec)

  1. tensorflow/compiler/mlir/lite/utils/utils.td

    // of our files will have access to `OpHasSameStaticShapes` when including files
    // generated from table-gen.
    def OpHasSameStaticShapesPred : CPred<"OpHasSameStaticShapes($0.getDefiningOp())">;
    def OpHasSameStaticShapes : Constraint<OpHasSameStaticShapesPred, "op must have static same input shapes">;
    def OpHasNotSameStaticShapes : Constraint<Neg<OpHasSameStaticShapesPred>, "op must have not static same input shapes">;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/post_quantize.cc

      LogicalResult matchAndRewrite(quantfork::DequantizeCastOp op,
                                    PatternRewriter& rewriter) const override {
        auto input_op = op.getArg().getDefiningOp();
        if (auto q = llvm::dyn_cast_or_null<quantfork::QuantizeCastOp>(input_op)) {
          if (!q->getAttr(kVolatileOpAttrName)) return failure();
    
          // If the quantize op is a requantize op, it is being used in other scale
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tpu_parallel_execute_sink_resource_write.cc

      auto assign_var = dyn_cast<TF::AssignVariableOp>(use.getOwner());
      if (!assign_var) return nullptr;
    
      if (use.get() != assign_var.getValue()) return nullptr;
    
      auto* resource_handle_op = assign_var.getResource().getDefiningOp();
      if (resource_handle_op == parallel_execute) return nullptr;
    
      if (resource_handle_op &&
          resource_handle_op->getBlock() ==
              parallel_execute.getOperation()->getBlock() &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 06 04:46:18 UTC 2022
    - 6.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/fold_broadcast.cc

      for (uint64_t i = 0, e = op->getNumOperands(); i < e; ++i) {
        // Check that the i'th operand is a broadcast.
        auto broadcast = llvm::dyn_cast_or_null<TF::BroadcastToOp>(
            op->getOpOperand(i).get().getDefiningOp());
        if (!broadcast) continue;
    
        // Check that the operand of the broadcast has fully defined shape.
        auto broadcast_arg_type = mlir::dyn_cast_or_null<RankedTensorType>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.h

      if (!return_op) return failure();
      if (return_op.getNumOperands() != 1) return failure();
    
      ReductionOp reduce_op = dyn_cast_or_null<ReductionOp>(
          return_op.getOperands().front().getDefiningOp());
      if (!reduce_op) return failure();
      if (reduce_op.getLhs() != body.getArgument(0) ||
          reduce_op.getRhs() != body.getArgument(1))
        return failure();
    
      return success();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Nov 08 11:35:25 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/partitioned_topological_sort.cc

      // An operation is ready to be scheduled if all its operands are ready. An
      // operand is ready if:
      const auto is_ready = [&](Value value, Operation *top) {
        Operation *parent = value.getDefiningOp();
        // - it is a block argument,
        if (parent == nullptr) return true;
        Operation *ancestor = block->findAncestorOpInBlock(*parent);
        // - it is an implicit capture,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 15:05:28 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/mark_input_output_aliases.cc

        }
        alias_info.output_index = result.getResultNumber();
      }
    
      for (auto& operand : cluster_func->getOpOperands()) {
        auto read_op = llvm::dyn_cast_or_null<TF::ReadVariableOp>(
            operand.get().getDefiningOp());
        if (!read_op) continue;
        if (!read_op->hasOneUse()) continue;
        auto it = resource_alias_info_map.find(read_op.getResource());
        if (it == resource_alias_info_map.end()) continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 04:14:26 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/graph_pruning.cc

    void VisitOpOperand(GraphOp graph, Value operand,
                        llvm::SmallPtrSetImpl<Operation*>* reachable_ops,
                        llvm::SmallVectorImpl<Operation*>* ops_to_visit) {
      Operation* def = operand.getDefiningOp();
      if (def && def->getParentOp() == graph && reachable_ops->insert(def).second) {
        // Op has not been visited, add to queue to visit later.
        ops_to_visit->push_back(def);
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 7.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc

      LogicalResult matchAndRewrite(TFL::DequantizeOp dequant_op,
                                    PatternRewriter& rewriter) const override {
        // We only fold i32 -> float pattern.
        auto input = dequant_op.getInput().getDefiningOp();
        if (!input) return failure();
    
        auto input_dequant = llvm::dyn_cast_or_null<TFL::QConstOp>(input);
        if (!input_dequant) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/prepare_quantize.cc

     private:
      LogicalResult matchAndRewrite(quantfork::QuantizeCastOp q_op,
                                    PatternRewriter& rewriter) const override {
        auto preceding_qcast =
            q_op.getArg().getDefiningOp<quantfork::QuantizeCastOp>();
        if (!preceding_qcast) return failure();
    
        auto new_qcast = rewriter.create<quantfork::QuantizeCastOp>(
            q_op.getLoc(), q_op.getType(), preceding_qcast.getArg());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 03 05:11:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top