Repository navigation
Commit b57b75f
authored
[ET-VK][testing] Fix qdq8ta_conv2d_activations test failures via configurable shader filtering (pytorch#16410)
The qdq8ta_conv2d_activations correctness tests were failing because the GPU timing collection function was filtering out quantize_and_pack_4w4c and unpack_4w4c_and_dequantize shaders from timing measurements. For these tests, these shaders ARE the operations being tested, not overhead.
This change refactors shader filtering to be configurable per test case:
- Added shader_filter member to TestCase class with getter/setter methods
- Created kDefaultShaderFilter (filters layout conversions + quantization) for backward compatibility
- Created kLayoutOnlyShaderFilter (filters only layout conversions) for tests where quantization is the primary operation
- Updated collect_gpu_timing_us() to accept shader_filter parameter
- Updated qdq8ta_conv2d_activations to use kLayoutOnlyShaderFilter
This allows tests to control what shaders are excluded from timing measurements based on what they're actually testing, while maintaining backward compatibility for all existing tests.
Differential Revision: [D89832383](https://our.internmc.facebook.com/intern/diff/D89832383/)1 parent 75d26cf commit b57b75f
3 files changed
Lines changed: 59 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
657 | 659 | | |
658 | 660 | | |
659 | 661 | | |
660 | | - | |
| 662 | + | |
| 663 | + | |
661 | 664 | | |
662 | 665 | | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
669 | 677 | | |
670 | 678 | | |
671 | 679 | | |
| |||
1192 | 1200 | | |
1193 | 1201 | | |
1194 | 1202 | | |
1195 | | - | |
| 1203 | + | |
| 1204 | + | |
1196 | 1205 | | |
1197 | 1206 | | |
1198 | 1207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
42 | 60 | | |
43 | 61 | | |
44 | 62 | | |
| |||
332 | 350 | | |
333 | 351 | | |
334 | 352 | | |
335 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
336 | 357 | | |
337 | | - | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
338 | 362 | | |
339 | 363 | | |
340 | 364 | | |
| |||
365 | 389 | | |
366 | 390 | | |
367 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
368 | 401 | | |
369 | 402 | | |
370 | 403 | | |
| |||
407 | 440 | | |
408 | 441 | | |
409 | 442 | | |
| 443 | + | |
410 | 444 | | |
411 | 445 | | |
412 | 446 | | |
| |||
416 | 450 | | |
417 | 451 | | |
418 | 452 | | |
| 453 | + | |
419 | 454 | | |
420 | 455 | | |
421 | 456 | | |
| |||
0 commit comments