-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Use torch.accelerator API in Fast Neural Style example #1327
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Dmitry Rogozhkin <[email protected]>
✅ Deploy Preview for pytorch-examples-preview canceled.
|
Cool! Although looks like you're not using the right pytorch version quite yet, you can be explicit see how we use requirements.txt in the repo within given folders |
I think I might need help with the requirements part of the story. Here is a snapshot of what was executed by ci (https://github.com/pytorch/examples/actions/runs/14539355819/job/40795679639?pr=1327):
I think that CI attempted to test the latest nightly, at least this implies that:
Then, test shell script downgraded already installed nightly torch to version 2.5.0. My guess is due to pinned version of torchvision in some of the requirements.txt files: examples/dcgan/requirements.txt Line 2 in 8393ceb
Also note:
|
Filed #1329 to discuss further. |
torch.accelerator API allows to abstract some of the accelerator specifics in the user scripts. This commit modifies Fast Neural Style example with the mentioned API.
Things to note:
--cuda
,--mps
,--xpu
) with the--accel
.torch.accelerator
API appeared in pytorch 2.6, so commit binds example to this torch versionCC: @malfet, @atalman