Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 139 for call_op (0.16 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_hashtable_ops_as_args.cc

      for (auto& function_use : function_uses.value()) {
        auto call_op = function_use.getUser();
        auto caller_func = call_op->getParentOfType<func::FuncOp>();
        if (!caller_func) return failure();
    
        builder.setInsertionPoint(call_op);
        for (auto [lifted_op, arg_idx] : lifted_op_and_arg_idx) {
          auto new_op = builder.clone(*lifted_op, mapping);
          call_op->insertOperands(arg_idx, new_op->getResult(0));
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. tensorflow/compiler/mlir/quantization/stablehlo/ops/stablehlo_op_quant_spec.cc

        }
      }
    }
    
    }  // namespace
    
    std::unique_ptr<OpQuantSpec> GetStableHloOpQuantSpec(Operation* op) {
      auto spec = std::make_unique<OpQuantSpec>();
      if (auto call_op = dyn_cast_or_null<TF::XlaCallModuleOp>(op)) {
        auto entry_function =
            call_op->getAttrOfType<FlatSymbolRefAttr>("_entry_function");
        StringRef function_name = entry_function.getValue();
        if (!function_name.starts_with("composite_")) {
          return spec;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/convert_launch_func_to_tf_call.cc

        OpBuilder builder(launch);
        auto call_op = builder.create<TF::PartitionedCallOp>(
            module.getLoc(), launch.getResultTypes(), launch.getOperands(),
            SymbolRefAttr::get(builder.getContext(), launch.getFunc()),
            /*config=*/builder.getStringAttr(""),
            /*config_proto=*/builder.getStringAttr(""),
            /*executor_type=*/builder.getStringAttr(""));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 31 21:08:09 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/tensorflow/transforms/add_functions_for_exported_names.cc

          other.addEntryBlock();
          OpBuilder builder(other.getRegion());
          auto call_op = builder.create<mlir::func::CallOp>(
              f.getLoc(), f.getFunctionType().getResults(), f.getSymName(),
              other.getRegion().getArguments());
          builder.create<mlir::func::ReturnOp>(f.getLoc(), call_op.getResults());
        }
    
        Unexport(f);
      }
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 08:06:04 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  10. tensorflow/cc/experimental/libtf/function.cc

          [fname, ctx]() { ctx->RemoveFunction(fname).IgnoreError(); });
      auto call_op = AbstractOperationPtr(ctx->CreateOperation());
      TF_RETURN_IF_ERROR(
          call_op->Reset(fname.c_str(), /*raw_device_name=*/nullptr));
      for (auto t : inputs) {
        TF_RETURN_IF_ERROR(call_op->AddInput(t));
      }
      int num_outputs = outputs.size();
      return call_op->Execute(outputs, &num_outputs);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 04 19:49:06 UTC 2024
    - 9.1K bytes
    - Viewed (0)
Back to top