Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for hasOneUse (0.16 sec)

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

                                      << "\n     in " << use->get() << "\n");
              if (constant.use_empty()) const_op.erase();
              return;
            }
            if (constant.hasOneUse()) {
              LLVM_DEBUG(llvm::dbgs() << "Moved constant " << constant << "\n");
              const_op.getOperation()->moveBefore(&body.begin()->front());
              return;
            }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/optimize_op_order.cc

          : OpRewritePattern<DequantizeOp>(context) {}
    
      LogicalResult matchAndRewrite(DequantizeOp dequantize_op,
                                    PatternRewriter& rewriter) const override {
        if (!dequantize_op->hasOneUse()) return failure();
    
        auto use = dequantize_op->use_begin();
        Operation* passthrough_op = use->getOwner();
        unsigned operand_index = use->getOperandNumber();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/post_quantize.cc

            // Don't remove leading and trailing QDQ for PTQ workflow, so the io
            // modifying lib can work correctly.
            if (!q.getArg().getDefiningOp()) return failure();
            if (op->hasOneUse() &&
                op->user_begin()->hasTrait<OpTrait::IsTerminator>())
              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
    - 5.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_read_for_write.cc

    ResourceValueAndSubtype GetResourceWriteResult(
        tf_device::ClusterFuncOp cluster_func, Value result) {
      ResourceValueAndSubtype resource;
      if (!result.hasOneUse()) return resource;
      Operation* result_user = *result.getUsers().begin();
      auto assign_var = dyn_cast<TF::AssignVariableOp>(result_user);
      if (!assign_var) return resource;
    
      auto handle = assign_var.getResource();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 16:54:40 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

                                    PatternRewriter &rewriter) const override {
        // We don't want to insert quantize/dequantize if the quantize op exists.
        auto res = tf_op.getOutputs();
        if (!res.hasOneUse() || isa<quantfork::QuantizeCastOp>(*res.user_begin()))
          return failure();
    
        // Extract the min/max constant values from the operands. We also consider
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tpu_parallel_execute_sink_resource_write.cc

    // before or above the parallel_execute.
    TF::AssignVariableOp GetSingleUseResourceWrite(
        tf_device::ParallelExecuteOp parallel_execute, Value result) {
      if (!result.hasOneUse()) return nullptr;
    
      OpOperand& use = *result.getUses().begin();
      auto assign_var = dyn_cast<TF::AssignVariableOp>(use.getOwner());
      if (!assign_var) return nullptr;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 06 04:46:18 UTC 2022
    - 6.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/utils/fake_quant_utils.h

                                    OpBuilder &rewriter) const {
        // We don't want to insert quantize/dequantize if the quantize op exists.
        auto res = tf_op.getOutputs();
        if (!res.hasOneUse() || isa<QuantizeOp>(*res.user_begin())) {
          return failure();
        }
    
        // Extract the min/max constant values from the operands. We also consider
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/fuse_convolution_pass.cc

            diag << "entities 'mul_value' failed to satisfy constraint: "
                    "unsupported dimensions";
          });
        }
        if (!is_dynamic_broadcast &&
            !((*conv_op.getODSResults(0).begin()).hasOneUse())) {
          return rewriter.notifyMatchFailure(mul_op, [&](::mlir::Diagnostic &diag) {
            diag << "entities 'conv' failed to satisfy constraint: has one use";
          });
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 22:21:19 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/optimize.cc

      LogicalResult matchAndRewrite(BroadcastToOp op,
                                    PatternRewriter &rewriter) const override {
        // Only rewrite if the Broadcast has only one consumer.
        if (!op.getOutput().hasOneUse()) return failure();
    
        Operation *user = *op.getOutput().getUsers().begin();
    
        auto reshape_op = llvm::dyn_cast_or_null<ReshapeOp>(user);
        if (!reshape_op) return failure();
    
        auto reshape_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc

        return other_convert_op &&
               converter.isLegal(other_convert_op.getOperand().getType());
      } else if (!converter.isLegal(convert_op.getResult().getType())) {
        if (!convert_op.getResult().hasOneUse()) {
          return false;
        }
        auto other_convert_op = dyn_cast_or_null<OtherConvertOp>(
            *convert_op.getResult().getUsers().begin());
        return other_convert_op &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.3K bytes
    - Viewed (0)
Back to top