A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 12:15 UTC
`pre-commit autoupdate` (#17380)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Apr 29, 2025 at 14:46 UTC
40896bdf3f22d9681b1cc5831d271fcc7ea56ae8
9 files changed
+37
-37
.pre-commit-config.yaml
+6
-6
@@ -12,29 +12,29 @@ repos:
12
- id: yapf
13
args: [--in-place, --verbose]
14
- repo: https://github.com/astral-sh/ruff-pre-commit
15
- rev: v0.9.3
15
+ rev: v0.11.7
16
hooks:
17
- id: ruff
18
args: [--output-format, github, --fix]
19
- repo: https://github.com/codespell-project/codespell
20
- rev: v2.4.0
20
+ rev: v2.4.1
21
hooks:
22
- id: codespell
23
additional_dependencies: ['tomli']
24
args: ['--toml', 'pyproject.toml']
25
- repo: https://github.com/PyCQA/isort
26
- rev: 0a0b7a830386ba6a31c2ec8316849ae4d1b8240d # 6.0.0
26
+ rev: 6.0.1
27
hooks:
28
- id: isort
29
- repo: https://github.com/pre-commit/mirrors-clang-format
30
- rev: v19.1.7
30
+ rev: v20.1.3
31
hooks:
32
- id: clang-format
33
exclude: 'csrc/(moe/topk_softmax_kernels.cu|quantization/gguf/(ggml-common.h|dequantize.cuh|vecdotq.cuh|mmq.cuh|mmvq.cuh))|vllm/third_party/.*'
34
types_or: [c++, cuda]
35
args: [--style=file, --verbose]
36
- repo: https://github.com/jackdewinter/pymarkdown
37
- rev: v0.9.27
37
+ rev: v0.9.29
38
hooks:
39
- id: pymarkdown
40
args: [fix]
@@ -43,7 +43,7 @@ repos:
43
hooks:
44
- id: actionlint
45
- repo: https://github.com/astral-sh/uv-pre-commit
46
- rev: 0.6.2
46
+ rev: 0.6.17
47
hooks:
48
- id: pip-compile
49
args: [requirements/test.in, -o, requirements/test.txt]
csrc/moe/marlin_kernels/marlin_moe_kernel.h
+4
-4
@@ -138,8 +138,8 @@ __device__ inline FragB dequant<vllm::kU4B8.id()>(int q) {
138
const int HI = 0x00f000f0;
139
const int EX = 0x64006400;
140
// Guarantee that the `(a & b) | c` operations are LOP3s.
141
- int lo = lop3 < (0xf0 & 0xcc) | 0xaa > (q, LO, EX);
142
- int hi = lop3 < (0xf0 & 0xcc) | 0xaa > (q, HI, EX);
141
+ int lo = lop3<(0xf0 & 0xcc) | 0xaa>(q, LO, EX);
142
+ int hi = lop3<(0xf0 & 0xcc) | 0xaa>(q, HI, EX);
143
// We want signed int4 outputs, hence we fuse the `-8` symmetric zero point
144
// directly into `SUB` and `ADD`.
145
const int SUB = 0x64086408;
@@ -182,8 +182,8 @@ __device__ inline FragB dequant<vllm::kU4.id()>(int q) {
182
const int HI = 0x00f000f0;
183
const int EX = 0x64006400;
184
// Guarantee that the `(a & b) | c` operations are LOP3s.
185
- int lo = lop3 < (0xf0 & 0xcc) | 0xaa > (q, LO, EX);
186
- int hi = lop3 < (0xf0 & 0xcc) | 0xaa > (q, HI, EX);
185
+ int lo = lop3<(0xf0 & 0xcc) | 0xaa>(q, LO, EX);
186
+ int hi = lop3<(0xf0 & 0xcc) | 0xaa>(q, HI, EX);
187
188
const int SUB = 0x64006400;
189
const int MUL = 0x2c002c00;
csrc/moe/marlin_moe_wna16/marlin_template.h
+4
-4
@@ -209,8 +209,8 @@ __device__ inline typename ScalarType<half>::FragB dequant<half, 4>(
209
const int HI = 0x00f000f0;
210
const int EX = 0x64006400;
211
// Guarantee that the `(a & b) | c` operations are LOP3s.
212
- int lo = lop3 < (0xf0 & 0xcc) | 0xaa > (q, LO, EX);
213
- int hi = lop3 < (0xf0 & 0xcc) | 0xaa > (q, HI, EX);
212
+ int lo = lop3<(0xf0 & 0xcc) | 0xaa>(q, LO, EX);
213
+ int hi = lop3<(0xf0 & 0xcc) | 0xaa>(q, HI, EX);
214
// We want signed int4 outputs, hence we fuse the `-8` symmetric zero point
215
// directly into `SUB` and `ADD`.
216
const int SUB = 0x64086408;
@@ -233,9 +233,9 @@ dequant<nv_bfloat16, 4>(int q,
233
234
// Guarantee that the `(a & b) | c` operations are LOP3s.
235
236
- int lo = lop3 < (0xf0 & 0xcc) | 0xaa > (q, MASK, EX);
236
+ int lo = lop3<(0xf0 & 0xcc) | 0xaa>(q, MASK, EX);
237
q >>= 4;
238
- int hi = lop3 < (0xf0 & 0xcc) | 0xaa > (q, MASK, EX);
238
+ int hi = lop3<(0xf0 & 0xcc) | 0xaa>(q, MASK, EX);
239
240
static constexpr uint32_t MUL = 0x3F803F80;
241
static constexpr uint32_t ADD = 0xC308C308;
csrc/moe/moe_wna16_utils.h
+8
-8
@@ -108,11 +108,11 @@ __device__ inline void dequant<half2, 4>(int q, half2* res) {
108
const int MUL = 0x2c002c00;
109
const int ADD = 0xd400d400;
110
111
- int lo0 = lop3 < (0xf0 & 0xcc) | 0xaa > (q, LO, EX);
112
- int hi0 = lop3 < (0xf0 & 0xcc) | 0xaa > (q, HI, EX);
111
+ int lo0 = lop3<(0xf0 & 0xcc) | 0xaa>(q, LO, EX);
112
+ int hi0 = lop3<(0xf0 & 0xcc) | 0xaa>(q, HI, EX);
113
q >>= 8;
114
- int lo1 = lop3 < (0xf0 & 0xcc) | 0xaa > (q, LO, EX);
115
- int hi1 = lop3 < (0xf0 & 0xcc) | 0xaa > (q, HI, EX);
114
+ int lo1 = lop3<(0xf0 & 0xcc) | 0xaa>(q, LO, EX);
115
+ int hi1 = lop3<(0xf0 & 0xcc) | 0xaa>(q, HI, EX);
116
117
res[0] = __hsub2(*reinterpret_cast<half2*>(&lo0),
118
*reinterpret_cast<const half2*>(&SUB));
@@ -149,13 +149,13 @@ __device__ inline void dequant<nv_bfloat162, 4>(int q, nv_bfloat162* res) {
149
static constexpr uint32_t MASK = 0x000f000f;
150
static constexpr uint32_t EX = 0x43004300;
151
152
- int lo0 = lop3 < (0xf0 & 0xcc) | 0xaa > (q, MASK, EX);
152
+ int lo0 = lop3<(0xf0 & 0xcc) | 0xaa>(q, MASK, EX);
153
q >>= 4;
154
- int hi0 = lop3 < (0xf0 & 0xcc) | 0xaa > (q, MASK, EX);
154
+ int hi0 = lop3<(0xf0 & 0xcc) | 0xaa>(q, MASK, EX);
155
q >>= 4;
156
- int lo1 = lop3 < (0xf0 & 0xcc) | 0xaa > (q, MASK, EX);
156
+ int lo1 = lop3<(0xf0 & 0xcc) | 0xaa>(q, MASK, EX);
157
q >>= 4;
158
- int hi1 = lop3 < (0xf0 & 0xcc) | 0xaa > (q, MASK, EX);
158
+ int hi1 = lop3<(0xf0 & 0xcc) | 0xaa>(q, MASK, EX);
159
160
static constexpr uint32_t MUL = 0x3F803F80;
161
static constexpr uint32_t ADD = 0xC300C300;
csrc/quantization/gptq_allspark/allspark_qgemm_w8a16.cu
+1
-1
@@ -347,7 +347,7 @@ struct ComputeTile_W8A16_PerC_MtilexNtilex32_multistage_SM8x_SplitK {
347
for (int n_idx = 0; n_idx < WARP_NITER; ++n_idx) {
348
hmma16816_f32<FType>(
349
C_frag[m_idx][n_idx], A_frag[reg_buf_idx][m_idx],
350
- reinterpret_cast<uint32_t(&)[2]>(BF_frag[reg_buf_idx][n_idx]));
350
+ reinterpret_cast<uint32_t (&)[2]>(BF_frag[reg_buf_idx][n_idx]));
351
}
352
}
353
}
csrc/quantization/gptq_marlin/gptq_marlin.cu
+8
-8
@@ -173,8 +173,8 @@ dequant<half, vllm::kU4B8.id()>(int q) {
173
const int HI = 0x00f000f0;
174
const int EX = 0x64006400;
175
// Guarantee that the `(a & b) | c` operations are LOP3s.
176
- int lo = lop3 < (0xf0 & 0xcc) | 0xaa > (q, LO, EX);
177
- int hi = lop3 < (0xf0 & 0xcc) | 0xaa > (q, HI, EX);
176
+ int lo = lop3<(0xf0 & 0xcc) | 0xaa>(q, LO, EX);
177
+ int hi = lop3<(0xf0 & 0xcc) | 0xaa>(q, HI, EX);
178
// We want signed int4 outputs, hence we fuse the `-8` symmetric zero point
179
// directly into `SUB` and `ADD`.
180
const int SUB = 0x64086408;
@@ -197,9 +197,9 @@ dequant<nv_bfloat16, vllm::kU4B8.id()>(int q) {
197
198
// Guarantee that the `(a & b) | c` operations are LOP3s.
199
200
- int lo = lop3 < (0xf0 & 0xcc) | 0xaa > (q, MASK, EX);
200
+ int lo = lop3<(0xf0 & 0xcc) | 0xaa>(q, MASK, EX);
201
q >>= 4;
202
- int hi = lop3 < (0xf0 & 0xcc) | 0xaa > (q, MASK, EX);
202
+ int hi = lop3<(0xf0 & 0xcc) | 0xaa>(q, MASK, EX);
203
204
typename ScalarType<nv_bfloat16>::FragB frag_b;
205
static constexpr uint32_t MUL = 0x3F803F80;
@@ -221,8 +221,8 @@ dequant<half, vllm::kU4.id()>(int q) {
221
const int HI = 0x00f000f0;
222
const int EX = 0x64006400;
223
// Guarantee that the `(a & b) | c` operations are LOP3s.
224
- int lo = lop3 < (0xf0 & 0xcc) | 0xaa > (q, LO, EX);
225
- int hi = lop3 < (0xf0 & 0xcc) | 0xaa > (q, HI, EX);
224
+ int lo = lop3<(0xf0 & 0xcc) | 0xaa>(q, LO, EX);
225
+ int hi = lop3<(0xf0 & 0xcc) | 0xaa>(q, HI, EX);
226
227
const int SUB = 0x64006400;
228
const int MUL = 0x2c002c00;
@@ -244,9 +244,9 @@ dequant<nv_bfloat16, vllm::kU4.id()>(int q) {
244
245
// Guarantee that the `(a & b) | c` operations are LOP3s.
246
247
- int lo = lop3 < (0xf0 & 0xcc) | 0xaa > (q, MASK, EX);
247
+ int lo = lop3<(0xf0 & 0xcc) | 0xaa>(q, MASK, EX);
248
q >>= 4;
249
- int hi = lop3 < (0xf0 & 0xcc) | 0xaa > (q, MASK, EX);
249
+ int hi = lop3<(0xf0 & 0xcc) | 0xaa>(q, MASK, EX);
250
251
typename ScalarType<nv_bfloat16>::FragB frag_b;
252
static constexpr uint32_t MUL = 0x3F803F80;
csrc/quantization/marlin/dense/marlin_cuda_kernel.cu
+2
-2
@@ -96,8 +96,8 @@ __device__ inline FragB dequant(int q) {
96
const int HI = 0x00f000f0;
97
const int EX = 0x64006400;
98
// Guarantee that the `(a & b) | c` operations are LOP3s.
99
- int lo = lop3 < (0xf0 & 0xcc) | 0xaa > (q, LO, EX);
100
- int hi = lop3 < (0xf0 & 0xcc) | 0xaa > (q, HI, EX);
99
+ int lo = lop3<(0xf0 & 0xcc) | 0xaa>(q, LO, EX);
100
+ int hi = lop3<(0xf0 & 0xcc) | 0xaa>(q, HI, EX);
101
// We want signed int4 outputs, hence we fuse the `-8` symmetric zero point
102
// directly into `SUB` and `ADD`.
103
const int SUB = 0x64086408;
csrc/quantization/marlin/qqq/marlin_qqq_gemm_kernel.cu
+2
-2
@@ -141,8 +141,8 @@ __device__ inline FragB dequant_per_group(int q, FragS_GROUP& frag_s, int i) {
141
static constexpr uint32_t HI = 0x00f000f0;
142
static constexpr uint32_t EX = 0x64006400;
143
// Guarantee that the `(a & b) | c` operations are LOP3s.
144
- uint32_t t0 = lop3 < (0xf0 & 0xcc) | 0xaa > (q, LO, EX);
145
- uint32_t t1 = lop3 < (0xf0 & 0xcc) | 0xaa > (q, HI, EX);
144
+ uint32_t t0 = lop3<(0xf0 & 0xcc) | 0xaa>(q, LO, EX);
145
+ uint32_t t1 = lop3<(0xf0 & 0xcc) | 0xaa>(q, HI, EX);
146
// We want signed int4 outputs, hence we fuse the `-8` symmetric zero point
147
// directly into `SUB` and `ADD`.
148
static constexpr uint32_t SUB = 0x64086408;
csrc/quantization/marlin/sparse/common/mma.h
+2
-2
@@ -127,8 +127,8 @@ __device__ inline FragB dequant_4bit(int q) {
127
const int HI = 0x00f000f0;
128
const int EX = 0x64006400;
129
// Guarantee that the `(a & b) | c` operations are LOP3s.
130
- int lo = lop3 < (0xf0 & 0xcc) | 0xaa > (q, LO, EX);
131
- int hi = lop3 < (0xf0 & 0xcc) | 0xaa > (q, HI, EX);
130
+ int lo = lop3<(0xf0 & 0xcc) | 0xaa>(q, LO, EX);
131
+ int hi = lop3<(0xf0 & 0xcc) | 0xaa>(q, HI, EX);
132
// We want signed int4 outputs, hence we fuse the `-8` symmetric zero point
133
// directly into `SUB` and `ADD`.
134
const int SUB = 0x64086408;