Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 61 for call_op (0.36 sec)

  1. 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)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/add_dump_tensor_op.cc

        TF::PartitionedCallOp call_op, const FlatSymbolRefAttr &f_attr) {
      std::optional<QuantizationUnitLoc::QuantizationUnit> quant_unit =
          FindQuantizationUnitFromLoc(call_op->getLoc());
      return std::make_pair(quant_unit->func_name(), quant_unit->node_name());
    }
    
    std::pair<std::string, std::string> GetFuncNameAndNodeName(
        TF::XlaCallModuleOp call_op, const FlatSymbolRefAttr &f_attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 22:55:22 UTC 2024
    - 13K bytes
    - Viewed (0)
  3. 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)
  4. tensorflow/compiler/mlir/lite/experimental/tac/transforms/pick_subgraphs.cc

          aggregated_cost_with_decisions;
    };
    
    // If the output is produced by a callop, will return the callop, otherwise,
    // will return nullptr.
    inline func::CallOp GetProducerCallOpOrNull(Value output) {
      Operation* output_op = output.getDefiningOp();
      if (output_op != nullptr && llvm::isa<func::CallOp>(output_op)) {
        return llvm::cast<func::CallOp>(output_op);
      }
      return nullptr;
    }
    
    class PickSubgraphsPass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 24 15:10:02 UTC 2022
    - 19.7K bytes
    - Viewed (0)
  5. 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)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_custom_aggregation_ops.cc

        if (method.ok() && method->has_static_range_ptq()) return true;
      }
    
      TF::PartitionedCallOp call_op = dyn_cast_or_null<TF::PartitionedCallOp>(op);
      return call_op && call_op->hasAttrOfType<StringAttr>(kQuantTraitAttrName) &&
             call_op->getAttrOfType<StringAttr>(kQuantTraitAttrName).getValue() ==
                 llvm::StringRef(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/common/lift_as_function_call_test.cc

      ASSERT_TRUE(module_op);
    
      func::FuncOp main_fn = FindMainFuncOp(*module_op);
      ASSERT_THAT(main_fn, NotNull());
    
      auto call_op = *main_fn.getOps<TF::XlaCallModuleOp>().begin();
      EXPECT_TRUE(HasWeightOnlyPtqMethod(call_op));
    }
    
    TEST_F(LiftAsFunctionCallTest, HasWeightOnlyPtqMethodDifferentMethod) {
      const absl::string_view kModuleDotNoQuantization = R"mlir(
        module {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.cc

      return method.has_weight_only_ptq();
    }
    
    bool IsWeightOnlyQuantizableOp(const Operation& op) {
      if (auto call_op = dyn_cast<TF::XlaCallModuleOp>(op)) {
        StringRef entry_function_name = GetEntryFunctionName(call_op);
        absl::StatusOr<Method> quantization_method = GetQuantizationMethod(call_op);
        return ContainsConvOrDot(entry_function_name) && quantization_method.ok() &&
               quantization_method->has_weight_only_ptq();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

      bool IsCompositeFunction(TF::PartitionedCallOp call_op) const {
        if (!call_op->hasAttr(kQuantTraitAttrName)) {
          return false;
        }
    
        const auto f_attr = call_op.getFAttr().dyn_cast<FlatSymbolRefAttr>();
        if (!f_attr || !f_attr.getValue().starts_with("composite_")) {
          return false;
        }
    
        bool has_quantized_types = false;
        for (Value input : call_op.getArgs()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_cfg.cc

      Block* then_block = builder.createBlock(merge_block);
      Operation* call_op = CallFn(loc, get_operand, op.then_function(), &builder);
    
      auto get_then_result = [&](int i) { return call_op->getResult(i); };
      JumpToBlock(loc, get_then_result, merge_block, &builder);
    
      // Set up the 'else' block.
      Block* else_block = builder.createBlock(merge_block);
      call_op = CallFn(loc, get_operand, op.else_function(), &builder);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jan 13 11:42:59 UTC 2023
    - 12.2K bytes
    - Viewed (0)
Back to top