enums.py Source File

enums.py Source File#

Mobilint SDK qb Compiler: enums.py Source File
Mobilint SDK qb Compiler v1.4
MCS002-EN
enums.py
1"""Auto-generated enum definitions from config_schema.yaml."""
2
3from enum import Enum
4
5
6class Device(str, Enum):
7 gpu = "gpu"
8 cpu = "cpu"
9
10 def __str__(self) -> str:
11 return self.value
12
13
14class HessianDtype(str, Enum):
15 fp32 = "fp32"
16 bf16 = "bf16"
17
18 def __str__(self) -> str:
19 return self.value
20
21
22class InferenceScheme(str, Enum):
23 single = "single"
24 multi = "multi"
25 _global = "global"
26 global4 = "global4"
27 global8 = "global8"
28 all = "all"
29
30 def __str__(self) -> str:
31 return self.value
32
33
34class Method(str, Enum):
35 DeleteFloat = "DeleteFloat"
36 SaveFloat = "SaveFloat"
37 MoveFloat = "MoveFloat"
38 KeepFloat = "KeepFloat"
39 KeepAll = "KeepAll"
40
41 def __str__(self) -> str:
42 return self.value
43
44
45class MoeExpertSelectionMode(str, Enum):
46 TopK = "TopK"
47 All = "All"
48 Threshold = "Threshold"
49
50 def __str__(self) -> str:
51 return self.value
52
53
54class QuantMethod(str, Enum):
55 WChALayer = "WChALayer"
56 WChAMulti = "WChAMulti"
57 WChALayerZeropoint = "WChALayerZeropoint"
58 WChAMultiZeropoint = "WChAMultiZeropoint"
59
60 def __str__(self) -> str:
61 return self.value
62
63
64class QuantMode(str, Enum):
65 Max = "Max"
66 MaxPercentile = "MaxPercentile"
67 Histogram = "Histogram"
68
69 def __str__(self) -> str:
70 return self.value
71
72
73class QuantOutput(str, Enum):
74 Layer = "Layer"
75 Ch = "Ch"
76 Sigmoid = "Sigmoid"
77
78 def __str__(self) -> str:
79 return self.value
80
81
82class SearchType(str, Enum):
83 Percentile = "Percentile"
84 MSE = "MSE"
85 KL = "KL"
86
87 def __str__(self) -> str:
88 return self.value
89
90
91class Solver(str, Enum):
92 symmetric = "symmetric"
93 asymmetric_causal = "asymmetric_causal"
94 asymmetric_refit = "asymmetric_refit"
95
96 def __str__(self) -> str:
97 return self.value