Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 70 for call_op (0.37 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc

        : public OpRewritePattern<func::CallOp> {
     public:
      explicit MergeFusionWithUniformDequantizePattern(MLIRContext* context)
          : OpRewritePattern<func::CallOp>(context) {}
      LogicalResult matchAndRewrite(func::CallOp call_op,
                                    PatternRewriter& rewriter) const override {
        if (call_op.getNumResults() != 1) return failure();
        auto users = call_op->getUsers();
        for (auto user : users) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/cc/report.cc

    std::optional<QuantizationResult> GetQuantizationResult(func::CallOp call_op) {
      const StringRef callee_name = call_op.getCalleeAttr().getValue();
      if (!callee_name.starts_with(kQuantizedFuncPrefix)) {
        return std::nullopt;  // `call_op` is not a quantized function call.
      }
    
      absl::StatusOr<Method> method = GetQuantizationMethod(call_op);
      if (!method.ok()) {
        call_op->emitError() << "Failed to get quantization method: "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/experimental/common/outline_operations.cc

      // for the call_op.
      Operation* last_output = subgraph.partition_ops_.back();
    
      builder.setInsertionPoint(last_output);
      auto call_op = builder.create<func::CallOp>(last_output->getLoc(), func,
                                                  subgraph.FuncArguments());
      ops_added.call_op = call_op;
      // FuncOutputs refer to the original `Values` in input module which are now
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

        PatternRewriter& rewriter, CallOp call_op,
        const SmallVectorImpl<Type>& output_types,
        const SmallVectorImpl<Value>& inputs, const NamedAttrList& attr_list,
        const llvm::StringMap<Attribute>& derived_attrs) const {
      // Create the new op
      Location loc = call_op.getLoc();
      rewriter.setInsertionPointAfter(call_op);
      std::string tf_op_name = GetTFOpName(call_op.getCallee());
    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/quantization/tensorflow/passes/quantize_composite_functions.cc

    bool IsQuantizedCallforDynamicRange(TF::PartitionedCallOp call_op) {
      bool has_quantized_types_for_weights = false;
      std::unique_ptr<OpQuantSpec> spec = GetTFOpQuantSpec(call_op);
    
      for (int32_t cur_idx = 0; cur_idx < call_op.getArgs().size(); cur_idx++) {
        // Check if the only the weight index has QuantizeCastOp.
        auto cur_op = dyn_cast_or_null<quantfork::QuantizeCastOp>(
            call_op.getArgs()[cur_idx].getDefiningOp());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

      using OpRewritePattern<TF::TPUPartitionedCallOp>::OpRewritePattern;
    
     private:
      LogicalResult matchAndRewrite(TF::TPUPartitionedCallOp call_op,
                                    PatternRewriter& rewriter) const override {
        auto f_attr = mlir::dyn_cast<FlatSymbolRefAttr>(call_op.getFAttr());
        auto module_op = call_op->getParentOfType<ModuleOp>();
        SymbolTable symbol_table(module_op);
    
        auto f_name = f_attr.getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc

     private:
      LogicalResult matchAndRewrite(TF::PartitionedCallOp call_op,
                                    PatternRewriter& rewriter) const override {
        StringRef function_name =
            mlir::cast<FlatSymbolRefAttr>(call_op.getFAttr()).getValue();
        if (!function_name.starts_with("composite_") ||
            !call_op->hasAttr(kQuantTraitAttrName)) {
          return failure();
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/compose_uniform_quantized_type_pass.cc

        return GetInverseScalesConstantOp().getValue();
      }
    
      func::CallOp GetCallOp() { return call_op_; }
    
      FlatSymbolRefAttr GetFunction() { return call_op_.getCalleeAttr(); }
    
     private:
      explicit UniformQuantizeFunctionCallPattern(func::CallOp call_op)
          : call_op_(call_op) {}
    
      func::CallOp call_op_;
    };
    
    // Matches the following pattern that represents uniform dequantization.
    //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tfr/passes/decompose.cc

      bool changed = false;
      auto walk_result = func.walk([&](CallOp call_op) {
        auto callee = table.lookup<TFRFuncOp>(call_op.getCallee());
        if (!callee || callee.isExternal()) return WalkResult::advance();
    
        // Record the boundary of the inlined operations. The inlined operation will
        // be inserted between these two operations.
        Operation* inlined_point = call_op.getOperation();
        Operation* after_inlined_point =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions_drq.cc

          int current_num_elements =
              mlir::cast<ShapedType>(call_op.getOperand(idx).getType())
                  .getNumElements();
          if (current_num_elements < min_num_elements_for_weights_) {
            call_op.emitRemark("Quantization is skipped for ")
                << call_op->getName().getStringRef().str() << " because it has "
                << current_num_elements
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
Back to top