Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 633 for composite_ (0.33 sec)

  1. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.h

    inline constexpr StringRef kNullAttributeValue = "N/A";
    
    // Prefixes attached to lifted functions.
    constexpr StringRef kQuantizedFuncPrefix = "quantized_";
    constexpr StringRef kCompositeFuncPrefix = "composite_";
    
    // The attribute will be used for TF::XlaCallModuleOp to restore the original
    // function name when loading it back.
    inline constexpr StringRef kOriginalStablehloEntryFunctionAttrName =
        "_original_entry_function";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/cc/report.cc

      });
    }
    
    // Populates non-quantized ops from `module_op` to `results`. After going
    // through the quantization passes, non-quantized quantizable units remain as
    // `TF::XlaCallModuleOp` with a callee's prefix of `composite_`.
    void PopulateNonQuantizedResults(ModuleOp module_op,
                                     QuantizationResults& results) {
      module_op.walk([&results](TF::XlaCallModuleOp xla_call_module_op) {
    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/quantization/tensorflow/ops/tf_op_quant_spec.cc

      if (auto call_op = dyn_cast<TF::PartitionedCallOp>(op)) {
        StringRef function_name =
            mlir::cast<FlatSymbolRefAttr>(call_op.getFAttr()).getValue();
        if (!function_name.starts_with("composite_")) {
          return spec;
        }
        if (function_name.contains("depthwise_conv2d")) {
          spec->coeff_op_quant_dim[1] = 3;
          if (function_name.contains("with_bias")) {
            spec->biases_params[2] = {{0, 1},
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/ops/stablehlo_op_quant_spec.cc

        auto entry_function =
            call_op->getAttrOfType<FlatSymbolRefAttr>("_entry_function");
        StringRef function_name = entry_function.getValue();
        if (!function_name.starts_with("composite_")) {
          return spec;
        }
    
        if (function_name.contains("conv")) {
          // Looks up `Method` to see if it should be per-channel quantized and
          // populates the spec accordingly.
    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/quantization/tensorflow/passes/add_dump_tensor_op.cc

    using DebuggerType = DebuggerConfig::DebuggerType;
    
    constexpr StringRef kEntryFuncAttrName = "_entry_function";
    constexpr StringRef kOriginalEntryFuncAttrName = "_original_entry_function";
    constexpr StringRef kCompositeFuncPrefix = "composite_";
    constexpr StringRef kEmptyNodeName = "_empty_node";
    
    // Returns a pair: `func_name` and `node_name` for the lifted function. In TF
    // quantizer, both are filled. For StableHLO quantizer, the func_name is only
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 22:55:22 UTC 2024
    - 13K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc

        StringRef function_name = f_attr.getValue();
        // TODO(b/228928859): Improve the getter function to match attributes rather
        // than function name.
        if (!function_name.starts_with("composite_")) {
          return failure();
        }
    
        if (function_name.contains("depthwise_conv2d")) {
          // Uniform Quantized op requires weights of tf.DepthwiseConv2dNative to
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc

        }
    
        // Only the composite functions with f32 inputs are quantizable.
        if (call_op.getResults().size() == 1 &&
            !mlir::cast<ShapedType>(call_op->getResult(0).getType())
                 .getElementType()
                 .isF32()) {
          check_status.Update(absl::InternalError(
              "Composite functions for quantization should be f32 type."));
        }
    
    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/quantization/tensorflow/passes/quantize_composite_functions.cc

        // than function name.
        // If enable_legacy_weight_only is enabled, QuantizeFunctionsPattern
        // does not get called and function remains as composite
        if (!function_name.starts_with("quantized_") &&
            !function_name.starts_with("composite_")) {
          return failure();
        }
    
        if (function_name.contains("depthwise_conv2d")) {
          return addReshapeOpToDepthwiseWeight(call_op, rewriter);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

        return false;
      }
    
      // Checks if op calls a composite function and all the inputs are quantized.
      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;
        }
    
    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/tfr/python/composite.py

    """Op composition registration."""
    
    
    # TODO(fengliuai): add the tf_export decrator
    class Composite(object):
      """A decorator to register a function as a composition for an TF operator.
    
      The argument to the decorator must be the name of a TF raw operator the
      function composites for. Decorated function must take positional arguments
      which corresponds to the input and attributes in OpDef of the TF operation.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 28 21:37:05 UTC 2021
    - 1.9K bytes
    - Viewed (0)
Back to top