Skip to content

Conversation

@apullin
Copy link
Contributor

@apullin apullin commented Nov 19, 2025

Summary:
This fixes two issues preventing the Neutron backend from building in sandcastle/build environments:

  1. NeutronAtenPassManager API compatibility: The NeutronAtenPassManager class was updated to require a neutron_target_spec parameter, but the call site wasn't updated. This caused a TypeError at runtime. Fixed by passing the already-available neutron_target_spec to the pass manager constructor.

  2. Multiprocessing fallback: The Neutron converter uses multiprocessing for isolation when converting models, but this fails in restricted build environments (sandcastle) with an EOFError when trying to create a multiprocessing Manager. Added a try/except block to catch EOFError and OSError and fall back to direct execution of the converter when multiprocessing is unavailable. This maintains isolation in normal environments while allowing builds to succeed in restricted ones.

Both issues were pre-existing on trunk and not caused by recent changes.

Differential Revision: D87252895

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 19, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15885

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 2 Unrelated Failures

As of commit 8aff4aa with merge base 213d24c (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following jobs failed but were 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 Nov 19, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 19, 2025

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

@github-actions
Copy link

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.

apullin pushed a commit to apullin/executorch that referenced this pull request Nov 20, 2025
…ytorch#15885)

Summary:

This fixes two issues preventing the Neutron backend from building in sandcastle/build environments:

1. **NeutronAtenPassManager API compatibility**: The `NeutronAtenPassManager` class was updated to require a `neutron_target_spec` parameter, but the call site  wasn't updated. This caused a `TypeError` at runtime. Fixed by passing the already-available `neutron_target_spec` to the pass manager constructor.

2. **Multiprocessing fallback**: The Neutron converter uses multiprocessing for isolation when converting models, but this fails in restricted build environments (sandcastle) with an `EOFError` when trying to create a multiprocessing Manager. Added a try/except block to catch `EOFError` and `OSError` and fall back to direct execution of the converter when multiprocessing is unavailable. This maintains isolation in normal environments while allowing builds to succeed in restricted ones.

Both issues were pre-existing on trunk and not caused by recent changes.

Differential Revision: D87252895
@robert-kalmar
Copy link
Collaborator

@apullin , LGTM, although, don't see the change related to

NeutronAtenPassManager API compatibility: The NeutronAtenPassManager class was updated to require a neutron_target_spec parameter, but the call site wasn't updated. This caused a TypeError at runtime. Fixed by passing the already-available neutron_target_spec to the pass manager constructor.

I checked the executorch OSS code base and did not find the above mentioned API compatibility break. Is is something in your internal code base?

@apullin
Copy link
Contributor Author

apullin commented Nov 20, 2025

I checked the executorch OSS code base and did not find the above mentioned API compatibility break. Is is something in your internal code base?

This is on an internal SDK, yes. My first time syncing between, so I should have labeled that.

…ytorch#15885)

Summary:

This fixes two issues preventing the Neutron backend from building in sandcastle/build environments:

1. **NeutronAtenPassManager API compatibility**: The `NeutronAtenPassManager` class was updated to require a `neutron_target_spec` parameter, but the call site  wasn't updated. This caused a `TypeError` at runtime. Fixed by passing the already-available `neutron_target_spec` to the pass manager constructor.

2. **Multiprocessing fallback**: The Neutron converter uses multiprocessing for isolation when converting models, but this fails in restricted build environments (sandcastle) with an `EOFError` when trying to create a multiprocessing Manager. Added a try/except block to catch `EOFError` and `OSError` and fall back to direct execution of the converter when multiprocessing is unavailable. This maintains isolation in normal environments while allowing builds to succeed in restricted ones.

Both issues were pre-existing on trunk and not caused by recent changes.

Differential Revision: D87252895
@meta-codesync meta-codesync bot merged commit b4d72f1 into pytorch:main Nov 20, 2025
142 of 147 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants