Skip to content

Fix failing tests: partitioner Python 3.12 compat + Vulkan hardshrink skip#19281

Open
psiddh wants to merge 1 commit intopytorch:mainfrom
psiddh:export-D103628836
Open

Fix failing tests: partitioner Python 3.12 compat + Vulkan hardshrink skip#19281
psiddh wants to merge 1 commit intopytorch:mainfrom
psiddh:export-D103628836

Conversation

@psiddh
Copy link
Copy Markdown
Contributor

@psiddh psiddh commented May 4, 2026

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

Copilot AI review requested due to automatic review settings May 4, 2026 17:56
@pytorch-bot pytorch-bot Bot added the module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ label May 4, 2026
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 4, 2026

🔗 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 SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 2 New Failures, 5 Unrelated Failures

As of commit 35d3bcf with merge base 54b8176 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

  • pull / test-moshi-linux / linux-job (gh) (matched linux rule in flaky-rules.json)
    E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/p/pocketsphinx/pocketsphinx-en-us_0.8.0%2breal5prealpha%2b1-14ubuntu1_all.deb Unable to connect to archive.ubuntu.com:80: [IP: 185.125.190.81 80]

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.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 4, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 4, 2026

@psiddh has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103628836.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 assertRaisesRegex in the partitioner test to accept both pre-3.12 and 3.12+ property-setter AttributeError text.
  • Mark the Vulkan Hardshrink delegate test as skipped due to swiftshader incompatibility.

Findings

  • backends/vulkan/test/test_vulkan_delegate.py:593 — The new @unittest.skip(...) disables test_vulkan_backend_hardshrink on all Vulkan environments, not just swiftshader. Since Vulkan CI already sets ETVK_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
@psiddh psiddh force-pushed the export-D103628836 branch from 37b455f to 35d3bcf Compare May 4, 2026 18:38
psiddh added a commit to psiddh/executorch that referenced this pull request May 4, 2026
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants