enums.py Source File

enums.py Source File#

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