Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for call_op (0.75 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/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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

    // Checks if an op calls a composite function and all the inputs and outputs are
    // quantized.
    bool IsQuantizedCompositeFunction(func::CallOp call_op) {
      if (!call_op.getCallee().starts_with("quantized_")) {
        return false;
      }
    
      bool has_quantized_types = false;
      for (Value operand : call_op.getOperands()) {
        if (const TensorType type = mlir::dyn_cast<TensorType>(operand.getType())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

    // quantization.
    inline FlatSymbolRefAttr GetFuncAttr(TF::PartitionedCallOp call_op) {
      return mlir::dyn_cast<FlatSymbolRefAttr>(call_op.getFAttr());
    }
    
    inline FlatSymbolRefAttr GetFuncAttr(TF::XlaCallModuleOp call_op) {
      return call_op->getAttrOfType<FlatSymbolRefAttr>(
          TF::kStablehloEntryFunctionAttrName);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
Back to top