Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 31 for SetArg (0.23 sec)

  1. tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc

      // Matches x -> [scast -> scast] -> y, replacing the second scast with the
      // value of x if the casts invert each other.
      auto srcScastOp = getArg().getDefiningOp<StorageCastOp>();
      if (!srcScastOp || srcScastOp.getArg().getType() != getType())
        return OpFoldResult();
      return srcScastOp.getArg();
    }
    
    /// The quantization specification should match the expressed type.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

      LogicalResult matchAndRewrite(quantfork::DequantizeCastOp dq_op,
                                    PatternRewriter& rewriter) const override {
        auto q_op = dq_op.getArg().getDefiningOp<quantfork::QuantizeCastOp>();
        if (!q_op) return failure();
    
        dq_op.replaceAllUsesWith(q_op.getArg());
        return success();
      }
    };
    
    class QuantizeSameScaleOpsPattern
        : public OpRewritePattern<quantfork::DequantizeCastOp> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/lite/tfl_to_std.cc

        b.setInsertionPoint(op);
        if (auto dq = llvm::dyn_cast<quantfork::DequantizeCastOp>(op)) {
          auto dcast = b.create<DequantizeOp>(dq.getLoc(), dq.getResult().getType(),
                                              dq.getArg());
          dq.getResult().replaceAllUsesWith(dcast);
          if (auto extra_attr = op->getAttr(mlir::quant::kVolatileOpAttrName)) {
            dcast->setAttr(mlir::quant::kVolatileOpAttrName, extra_attr);
          }
          dq.erase();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 02:50:01 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

        if (!tensor_type) return cast_op.getArg();
    
        auto attr_names = tensor_type.getAttrKeys();
        if (attr_names.empty() || attr_names.size() > 1) return cast_op.getArg();
        StringRef tfr_type_attr = attr_names[0].getValue();
        if (!fixed_elt_type_attrs_.contains(tfr_type_attr)) return cast_op.getArg();
    
        Type result_elt_type = GetFixedElementType(tfr_type_attr, rewriter);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

        mlir::IntegerAttr axis;
        for (auto& stats_op : stats_ops) {
          rewriter.setInsertionPointAfter(stats_op);
          rewriter.replaceOpWithNewOp<quantfork::StatisticsOp>(
              stats_op, stats_op.getArg(), layer_stats, axis_stats, axis);
        }
        return success();
      }
    };
    
    template <typename SourceOp>
    class ConvertOpStatsToQDQs : public OpRewritePattern<SourceOp> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc

      if (!dq_op) {
        auto mul_op = builder.create<TF::MulOp>(loc, value, multiplier);
        return mul_op.getResult();
      }
      auto q_op = dq_op.getArg().getDefiningOp<quantfork::QuantizeCastOp>();
      if (!q_op) return {};
    
      Value float_value = q_op.getArg();
      Value new_value = builder.create<TF::MulOp>(loc, float_value, multiplier);
      auto new_value_type = mlir::cast<TensorType>(new_value.getType());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/prepare_quantize.cc

                                    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());
        new_qcast->setAttr(kVolatileOpAttrName, rewriter.getUnitAttr());
        q_op->replaceAllUsesWith(new_qcast);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 03 05:11:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/analysis/resource_alias_analysis.cc

      // can backtracked to. Such results will be called "function passthrough". If
      // the result cannot be backtracked to a region argument, returns
      // std::nullopt.
      std::optional<int> GetArg(int result_index) const {
        if (auto arg = mlir::dyn_cast<BlockArgument>(GetValue(result_index)))
          if (arg.getParentBlock() == &region_->front()) return arg.getArgNumber();
        return std::nullopt;
      }
    
     private:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc

                  preceding_op)) {
            if (auto q_op = llvm::dyn_cast_or_null<quantfork::QuantizeCastOp>(
                    dq_op.getArg().getDefiningOp())) {
              Operation* q_op_input = q_op.getArg().getDefiningOp();
              is_weight_constant =
                  q_op_input && q_op_input->hasTrait<OpTrait::ConstantLike>();
            }
          }
    
          if (!is_weight_constant) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  10. subprojects/core/src/main/java/org/gradle/process/internal/worker/request/WorkerAction.java

                            @Override
                            public Object call() throws Exception {
                                return implementation.run(request.getArg());
                            }
                        });
                    } catch (Throwable failure) {
                        if (failure instanceof NoClassDefFoundError) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Mar 27 08:22:48 UTC 2024
    - 7.4K bytes
    - Viewed (0)
Back to top