Skip to content

Add accelerate API support for Super Resolution example #1358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

framoncg
Copy link
Contributor

Refactor Super Resolution example to utilize torch.accelerator API. torch.accelerator API allows to abstract some of the accelerator specifics in the user scripts. By leveraging this API, the code becomes more adaptable to various hardware accelerators.

Updated super_resolution/main.py with accelerator flag
Updated super_resolution/super_resolve.py with accelerator flag
Updated README to match super_resolution/main.py flags
Updated run_python_examples.sh to add new accelerator flag to example

CC: @msaroufim, @dvrogozh

@framoncg framoncg requested a review from msaroufim as a code owner June 18, 2025 23:52
Copy link

netlify bot commented Jun 18, 2025

Deploy Preview for pytorch-examples-preview canceled.

Name Link
🔨 Latest commit bce3176
🔍 Latest deploy log https://app.netlify.com/projects/pytorch-examples-preview/deploys/6853513cd05a530008fff83d

@msaroufim msaroufim merged commit 6f61614 into pytorch:main Jun 24, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants