Skip to content

[Autograd] Add Default Autograd Fallback for PrivateUse1 in PyTorch#165315

Closed
fffrog wants to merge 2 commits intogh/fffrog/179/basefrom
gh/fffrog/179/head
Closed

[Autograd] Add Default Autograd Fallback for PrivateUse1 in PyTorch#165315
fffrog wants to merge 2 commits intogh/fffrog/179/basefrom
gh/fffrog/179/head

Conversation

@fffrog
Copy link
Collaborator

@fffrog fffrog commented Oct 13, 2025

Stack from ghstack (oldest at bottom):

Please refer to this link for more background.

  • Allow register fallback for AutogradPrivateUse1 multiple.
  • Add Autograd fallback implemetation for AutogradPrivateUse1

PyTorch can privide a common implementation for AutogradPrivateUse1, and the user can override it based on the need of specififc accelerator.

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 13, 2025

🔗 Helpful Links

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

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

⏳ No Failures, 22 Pending

As of commit 116fd45 with merge base e67e3d9 (image):
💚 Looks good so far! There are no failures yet. 💚

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

fffrog added a commit that referenced this pull request Oct 13, 2025
Please refer to this [link](#163979) for more background.

- Allow register fallback for AutogradPrivateUse1 multiple.
- Add Autograd fallback implemetation for AutogradPrivateUse1

PyTorch can privide a common implementation for AutogradPrivateUse1, and the user can override it based on the need of specififc accelerator.


ghstack-source-id: 279846c
Pull-Request: #165315
@fffrog
Copy link
Collaborator Author

fffrog commented Oct 14, 2025

@pytorchbot label "topic: not user facing"

@fffrog fffrog marked this pull request as ready for review October 14, 2025 03:06
@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Oct 14, 2025
@fffrog fffrog requested review from albanD and ezyang October 14, 2025 03:06
@ezyang ezyang removed their request for review October 15, 2025 01:15
@ezyang
Copy link
Contributor

ezyang commented Oct 15, 2025

Deferring to Alban here, there was some discussion about this

@fffrog
Copy link
Collaborator Author

fffrog commented Oct 15, 2025

Deferring to Alban here, there was some discussion about this

Got it, thank you.

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Sounds good as a first step.
Let's continue to chat on the issue for the inplace or view kernel.

@fffrog
Copy link
Collaborator Author

fffrog commented Oct 24, 2025

Let's continue to chat on the issue for the inplace or view kernel.

Got it, thank you.

@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #165316

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Rebased gh/fffrog/180/orig onto refs/remotes/origin/main because #165316 was rebased, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/165315)

@fffrog
Copy link
Collaborator Author

fffrog commented Oct 25, 2025

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 25, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #165316

pytorchmergebot pushed a commit that referenced this pull request Oct 25, 2025
…Private1 (#165316)

As the title stated.

The fallback for AutogradPrivateUse1 is builtin in PyTorch, so it is no need to register general implementation for out of tree backend.
Pull Request resolved: #165316
Approved by: https://github.com/ezyang, https://github.com/albanD
ghstack dependencies: #165315
Khanaksahu pushed a commit to Khanaksahu/pytorch-fork that referenced this pull request Nov 17, 2025
Please refer to this [link](pytorch/pytorch#163979) for more background.

- Allow register fallback for AutogradPrivateUse1 multiple.
- Add Autograd fallback implemetation for AutogradPrivateUse1

PyTorch can privide a common implementation for AutogradPrivateUse1, and the user can override it based on the need of specififc accelerator.


ghstack-source-id: 8bc59b0
Pull-Request: pytorch/pytorch#165315
@github-actions github-actions bot deleted the gh/fffrog/179/head branch November 28, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants