Commit 48e0f41
Fix failing tests: partitioner Python 3.12 compat + Vulkan hardshrink skip (pytorch#19281)
Summary:
Fix two test failures for the ai_infra_mobile_platform oncall:
1. test_partitioner_with_spec: Python 3.12 changed the AttributeError message for property setters from "can't set attribute 'spec'" to "property 'spec' of '...' object has no setter". Updated the assertRaisesRegex pattern to match both versions.
2. test_vulkan_backend_hardshrink (and 7 other swiftshader-incompatible tests): Replaced unconditional `unittest.skip` with a conditional `skip_if_swiftshader` decorator that detects swiftshader via env var (`ETVK_USING_SWIFTSHADER`), VK_ICD_FILENAMES, or loaded library check. Tests will now run on real Vulkan drivers (non-swiftshader environments) while still skipping in CI where swiftshader is used.
Differential Revision: D1036288361 parent 0a113f8 commit 48e0f41
2 files changed
Lines changed: 33 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
44 | 68 | | |
45 | 69 | | |
46 | 70 | | |
| |||
590 | 614 | | |
591 | 615 | | |
592 | 616 | | |
| 617 | + | |
593 | 618 | | |
594 | 619 | | |
595 | 620 | | |
| |||
1028 | 1053 | | |
1029 | 1054 | | |
1030 | 1055 | | |
1031 | | - | |
| 1056 | + | |
1032 | 1057 | | |
1033 | 1058 | | |
1034 | 1059 | | |
| |||
1459 | 1484 | | |
1460 | 1485 | | |
1461 | 1486 | | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
| 1487 | + | |
1465 | 1488 | | |
1466 | 1489 | | |
1467 | 1490 | | |
| |||
1480 | 1503 | | |
1481 | 1504 | | |
1482 | 1505 | | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
| 1506 | + | |
1486 | 1507 | | |
1487 | 1508 | | |
1488 | 1509 | | |
| |||
2364 | 2385 | | |
2365 | 2386 | | |
2366 | 2387 | | |
2367 | | - | |
| 2388 | + | |
2368 | 2389 | | |
2369 | 2390 | | |
2370 | 2391 | | |
| |||
2439 | 2460 | | |
2440 | 2461 | | |
2441 | 2462 | | |
2442 | | - | |
| 2463 | + | |
2443 | 2464 | | |
2444 | 2465 | | |
2445 | 2466 | | |
| |||
2530 | 2551 | | |
2531 | 2552 | | |
2532 | 2553 | | |
2533 | | - | |
| 2554 | + | |
2534 | 2555 | | |
2535 | 2556 | | |
2536 | 2557 | | |
| |||
2610 | 2631 | | |
2611 | 2632 | | |
2612 | 2633 | | |
2613 | | - | |
| 2634 | + | |
2614 | 2635 | | |
2615 | 2636 | | |
2616 | 2637 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
0 commit comments