Fix failing tests: partitioner Python 3.12 compat + Vulkan hardshrink skip#19281
Fix failing tests: partitioner Python 3.12 compat + Vulkan hardshrink skip#19281psiddh wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19281
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 New Failures, 5 Unrelated FailuresAs of commit 35d3bcf with merge base 54b8176 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but was present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@psiddh has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103628836. |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
This PR updates two test-only changes to keep ExecuTorch CI green: one loosens a partitioner exception assertion for Python 3.12, and the other skips a Vulkan Hardshrink test because swiftshader crashes on unsupported SPIR-V features.
Changes:
- Broaden the
assertRaisesRegexin the partitioner test to accept both pre-3.12 and 3.12+ property-setterAttributeErrortext. - Mark the Vulkan
Hardshrinkdelegate test as skipped due to swiftshader incompatibility.
Findings
backends/vulkan/test/test_vulkan_delegate.py:593— The new@unittest.skip(...)disablestest_vulkan_backend_hardshrinkon all Vulkan environments, not just swiftshader. Since Vulkan CI already setsETVK_USING_SWIFTSHADER=1, this should be a conditional skip; otherwise we lose Hardshrink coverage on real Vulkan drivers and can miss backend regressions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
exir/backend/test/test_partitioner.py |
Updates a regex in the partitioner immutability test for Python-version-dependent AttributeError wording. |
backends/vulkan/test/test_vulkan_delegate.py |
Adds a skip decorator to the Vulkan Hardshrink delegate test for swiftshader-related crashes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| self.lower_unary_module_and_test_output(SqrtModule()) | ||
|
|
||
| @unittest.skip("Hardshrink shader not compatible with swiftshader") |
… skip 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: D103628836
… 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: D103628836
Summary:
Fix two test failures for the ai_infra_mobile_platform oncall:
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.
test_vulkan_backend_hardshrink (and 7 other swiftshader-incompatible tests): Replaced unconditional
unittest.skipwith a conditionalskip_if_swiftshaderdecorator 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: D103628836