Commit f828f68
committed
[ET-VK] Address PR review: drop 8w/8da8w, add int8 coopmat gate, fix batch guard
Three changes addressing bot review on the quantized coopmat dispatch PR:
1. Drop 8w and 8da8w from the PR scope (reviewer request: keep this PR
focused on int4 quantization). Removes linear_dq8ca_q8csw_tiled shader,
the two 8w/8da8w YAML variants from the consolidated templates, all
dispatch logic in QuantizedLinear.cpp, the op registration stack
(custom_ops_lib.py / op_registry.py / patterns/quantized_linear.py),
test_dq8ca_q8csw_linear.cpp, and the "8da8w" llm_config qmode entry.
2. Add int8 cooperative-matrix capability gate (Copilot #6): the existing
can_use_q4gsw_coopmat() gate checked only supports_cooperative_matrix()
which reports fp16 support, not whether VK_COMPONENT_TYPE_SINT8_KHR is
enumerated. Adds supports_int8_cooperative_matrix() to Adapter.h (backed
by a one-time vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR query in
Device.cpp) and gates the dq8ca_q4gsw coopmat dispatch on it.
3. Reject batched outputs before coopmat dispatch (Codex P1 #8): adds a
dim_of(output) > 2 check to can_use_q4gsw_coopmat(), matching the guard
in is_coopmat_eligible(). The coopmat shaders use gl_WorkGroupID.xy only;
a rank-3 output with aligned last two dims would silently miscompute.
Also updates the YAML/GLSL template comments to reflect single-variant scope,
fixes linear_qw_coopmat.yaml tile geometry to the tsweep optimum (128x64,
2x2 subgroup grid, sg32; ~+25% prefill on M5 EVT1 over the prior 128x128),
and updates quantized_linear_global/local_wg_size to use per-shader wg_size
from CoopmatTileDims rather than the hardcoded kCoopmatInvocations (which was
wrong after the tile change reduced q4gsw WG size from 256 to 128).1 parent 03cc7d8 commit f828f68
18 files changed
Lines changed: 103 additions & 920 deletions
File tree
- backends/vulkan
- _passes
- patterns
- runtime
- graph/ops
- glsl
- impl
- vk_api
- test/custom_ops
- extension/llm/export/config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | 310 | | |
346 | 311 | | |
347 | 312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | 484 | | |
502 | 485 | | |
503 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
238 | 235 | | |
239 | 236 | | |
240 | 237 | | |
| |||
492 | 489 | | |
493 | 490 | | |
494 | 491 | | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | 492 | | |
575 | 493 | | |
576 | 494 | | |
| |||
752 | 670 | | |
753 | 671 | | |
754 | 672 | | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | 673 | | |
763 | 674 | | |
764 | 675 | | |
| |||
Lines changed: 0 additions & 159 deletions
This file was deleted.
Lines changed: 0 additions & 29 deletions
This file was deleted.
0 commit comments