Skip to content

Arm backend: Add optional ToDevicePass#18230

Open
Erik-Lundell wants to merge 1 commit intopytorch:mainfrom
Erik-Lundell:change-1219317
Open

Arm backend: Add optional ToDevicePass#18230
Erik-Lundell wants to merge 1 commit intopytorch:mainfrom
Erik-Lundell:change-1219317

Conversation

@Erik-Lundell
Copy link
Collaborator

@Erik-Lundell Erik-Lundell commented Mar 17, 2026

A pass to move a graph_module to a device correctly. This is needed on models containing ops with "device" kwargs. They are not moved when model.to(device=....) is called.

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell

A pass to move a graph_module to a device correctly.

Signed-off-by: Erik Lundell <erik.lundell@arm.com>
Change-Id: I00853022c77ecb60020e8f38c57ad4b1df3725df
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 17, 2026

🔗 Helpful Links

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

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

❌ 1 Cancelled Job

As of commit d9b147c with merge base 31118d7 (image):

CANCELLED JOB - The following job was cancelled. Please retry:

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 Mar 17, 2026
@Erik-Lundell Erik-Lundell added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes ciflow/trunk labels Mar 17, 2026
@JakeStevens
Copy link
Contributor

Any reason not to have this type of pass in backends/transforms or similar? seems backend agnostic

@Erik-Lundell
Copy link
Collaborator Author

No particular reason. Would you consider this a good solution/ can you get a review for someone that can judge that? If there is a better way, I'd prefer that but if not, let's add it as a backend-agnostic pass. @JakeStevens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants