File: dnnlowp_pybind11.pyi

package info (click to toggle)
pytorch 1.13.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 139,252 kB
  • sloc: cpp: 1,100,274; python: 706,454; ansic: 83,052; asm: 7,618; java: 3,273; sh: 2,841; javascript: 612; makefile: 323; xml: 269; ruby: 185; yacc: 144; objc: 68; lex: 44
file content (41 lines) | stat: -rw-r--r-- 2,956 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# pyre-strict
from typing import Tuple, List, Dict

class QueryTensorQparam:
    def __init__(self, scale: float, zero_point: int, precision: int) -> None: ...
    def scale(self) -> float: ...
    def zero_point(self) -> int: ...
    def precision(self) -> int: ...
    def min(self) -> float: ...
    def max(self) -> float: ...

class HistogramNetObserver:
    pass

class OutputColumnMaxHistogramNetObserver:
    pass

class RegisterQuantizationParamsWithHistogramNetObserver:
    pass

def ClearNetObservers() -> None: ...
def ObserveMinMaxOfOutput(min_max_file_name: str, dump_freq: int = -1, delimiter: str = " ") -> None: ...
def ObserveHistogramOfOutput(out_file_name: str, dump_freq: int = -1, mul_nets: bool = False, op_filter: str = "", delimiter: str = " ") -> None: ...
def DumpHistogramFile(ob: HistogramNetObserver) -> None: ...
def AddHistogramObserver(net_name: str, out_file_name: str, dump_freq: int = -1, mul_nets: bool = False, delimiter: str = " ") -> HistogramNetObserver: ...
def DumpOutputColumnMaxHistogramFile(ob: OutputColumnMaxHistogramNetObserver) -> None: ...
def AddOutputColumnMaxHistogramObserver(net_name: str, out_file_name: str, observe_column_max_for_blobs: List[str], dump_freq: int = -1, bin_nums: int = 16, mul_nets: bool = False, delimiter: str = " ") -> OutputColumnMaxHistogramNetObserver: ...
def ChooseQuantizationParams(blob_name: str) -> Tuple[float, int]: ...
def RegisterQuantizationParams(min_max_file_name: str, is_weight: bool = False, qparams_output_file_name: str = "") -> None: ...
def RegisterQuantizationParamsWithHistogram(histogram_file_name: str, is_weight: bool = False, qparams_output_file_name: str = "") -> None: ...
def AddRegisterQuantizationParamsWithHistogramObserver(net_name: str, histogram_file_name: str, is_weight: bool = False, qparams_output_file_name: str = "") -> RegisterQuantizationParamsWithHistogramNetObserver: ...
def AddScaleZeroOffsetArgumentsWithHistogram(net_def_bytes: bytes, histogram_file_name: str) -> bytes: ...
def get_fakefp16_mapping(use_fp16_acc: bool, use_nnpi: bool) -> Dict[str, str]: ...
def freeze_quantization_params(net_def_bytes: bytes) -> bytes: ...
def ChooseStaticQuantizationParams(min: float, max: float, bins: List[int], preserve_sparsity: bool = True, precision: int = 8, quant_scheme: str = "min_max", p99_threshold: float = 0.99, is_weight: bool = False) -> QueryTensorQparam: ...
def ObserveFp16FCPackedWeights(blob_name: str, weights_out_file: str) -> None: ...
def ObserveInt8FCPackedWeights(blob_name: str, weights_out_file: str) -> None: ...
def CreateInt8QuantSchemeBlob(quant_scheme_blob_name: str, quantization_kind: str, preserve_sparsity: bool) -> None: ...
def CreateInt8QuantParamsBlob(quant_param_blob_name: str, scale: float, zero_point: int) -> None: ...
def ObserveInt8QuantParamsBlob(quant_params_blob_name: str) -> Tuple[float, int]: ...
def ObserveInt8QuantSchemeBlob(quant_scheme_blob_name: str) -> Tuple[str, bool]: ...