Commit d4a3ff4
authored
fix: correct PDL parameter handling in RopeQuantize kernel (#1982)
<!-- .github/pull_request_template.md -->
## 📌 Description
### 1. Fixed Parameter Alignment
- **Issue**: The `stream` parameter was being passed to the wrong
position in the `RopeQuantize` function call due to missing `enable_pdl`
parameter. SGLang will hang before this pr.
- **Fix**: Added the `enable_pdl` parameter to the function signature
and properly aligned all parameters
### 2. Fixed PDL Launch Configuration
- **Issue**: When `enable_pdl=true`, the kernel would throw CUDA errors
due to incorrect PDL attribute handling
- **Fix**: Aligned the implementation with `csrc/fmhaReduction.cu`.
<!-- What does this PR do? Briefly describe the changes and why they’re
needed. -->
## 🔍 Related Issues
<!-- Link any related issues here -->
## 🚀 Pull Request Checklist
Thank you for contributing to FlashInfer! Before we review your pull
request, please make sure the following items are complete.
### ✅ Pre-commit Checks
- [x] I have installed `pre-commit` by running `pip install pre-commit`
(or used your preferred method).
- [x] I have installed the hooks with `pre-commit install`.
- [x] I have run the hooks manually with `pre-commit run --all-files`
and fixed any reported issues.
> If you are unsure about how to set up `pre-commit`, see [the
pre-commit documentation](https://pre-commit.com/).
## 🧪 Tests
- [x] Tests have been added or updated as needed.
- [x] All tests are passing (`unittest`, etc.).
## Reviewer Notes
<!-- Optional: anything you'd like reviewers to focus on, concerns, etc.
-->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added PDL (Programmatic Dynamic Launch) benchmarking capability for
rope quantization operations.
* Extended configuration options to enable or disable PDL functionality.
* **Tests**
* Updated test suite to validate PDL enabled and disabled scenarios in
rope quantization workflows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent d225332 commit d4a3ff4
File tree
6 files changed
+49
-20
lines changed- benchmarks
- csrc
- flashinfer
- include/flashinfer
- tests/attention
6 files changed
+49
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| |||
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
281 | 299 | | |
282 | 300 | | |
283 | 301 | | |
| |||
289 | 307 | | |
290 | 308 | | |
291 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
292 | 313 | | |
293 | 314 | | |
294 | 315 | | |
| |||
319 | 340 | | |
320 | 341 | | |
321 | 342 | | |
| 343 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
| 274 | + | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| 205 | + | |
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
| |||
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| |||
1159 | 1162 | | |
1160 | 1163 | | |
1161 | 1164 | | |
| 1165 | + | |
1162 | 1166 | | |
1163 | 1167 | | |
1164 | 1168 | | |
| |||
1175 | 1179 | | |
1176 | 1180 | | |
1177 | 1181 | | |
| 1182 | + | |
1178 | 1183 | | |
1179 | 1184 | | |
1180 | 1185 | | |
| |||
1193 | 1198 | | |
1194 | 1199 | | |
1195 | 1200 | | |
| 1201 | + | |
1196 | 1202 | | |
1197 | 1203 | | |
1198 | 1204 | | |
| |||
1237 | 1243 | | |
1238 | 1244 | | |
1239 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
1240 | 1248 | | |
1241 | 1249 | | |
1242 | 1250 | | |
| |||
1291 | 1299 | | |
1292 | 1300 | | |
1293 | 1301 | | |
| 1302 | + | |
1294 | 1303 | | |
1295 | 1304 | | |
1296 | 1305 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
816 | 819 | | |
817 | 820 | | |
818 | 821 | | |
819 | | - | |
820 | 822 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
834 | 826 | | |
835 | 827 | | |
836 | 828 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
| |||
389 | 390 | | |
390 | 391 | | |
391 | 392 | | |
| 393 | + | |
392 | 394 | | |
393 | 395 | | |
394 | 396 | | |
| |||
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
| 464 | + | |
462 | 465 | | |
463 | 466 | | |
464 | 467 | | |
| |||
481 | 484 | | |
482 | 485 | | |
483 | 486 | | |
| 487 | + | |
484 | 488 | | |
485 | 489 | | |
486 | 490 | | |
487 | 491 | | |
| 492 | + | |
488 | 493 | | |
489 | 494 | | |
490 | 495 | | |
| |||
525 | 530 | | |
526 | 531 | | |
527 | 532 | | |
| 533 | + | |
528 | 534 | | |
529 | 535 | | |
530 | 536 | | |
| |||
0 commit comments