Commit b75063b
expose rounding_mode in quantization for performance (#3368)
Summary:
X-link: facebookresearch/FBGEMM#1884
X-link: pytorch/FBGEMM#4862
Pull Request resolved: #3368
Expose the rounding_mode for mx4 as it could impact the QPS. Previous work was done here. D62466094
```
class RoundingMode(IntEnum):
"""Rounding options for quantization."""
nearest = 0
floor = 1
even = 2
stochastic = 3
ceil = 4
```
https://fburl.com/code/8prz4mem
Reviewed By: victor-eds
Differential Revision: D82001579
fbshipit-source-id: 872cd8ba62292b95e568ece47ac09052f28ca59e1 parent 8e7fd24 commit b75063b
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
| 139 | + | |
135 | 140 | | |
136 | 141 | | |
137 | 142 | | |
| |||
151 | 156 | | |
152 | 157 | | |
153 | 158 | | |
| 159 | + | |
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
| |||
0 commit comments