-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[DTensor] fix F.one_hot #162307
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
[DTensor] fix F.one_hot #162307
Conversation
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/162307
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit cfe6ffb with merge base f4c33cd ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. ghstack-source-id: 98860a4 Pull Request resolved: #162307
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. cc H-Huang awgu wanchaol fegin fduwjj wz337 wconstab d4l3k pragupta ezyang msaroufim [ghstack-poisoned]
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. ghstack-source-id: 1cc8827 Pull Request resolved: #162307
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. cc H-Huang awgu wanchaol fegin fduwjj wz337 wconstab d4l3k pragupta ezyang msaroufim [ghstack-poisoned]
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. ghstack-source-id: 0eac1d6 Pull Request resolved: #162307
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. cc H-Huang awgu wanchaol fegin fduwjj wz337 wconstab d4l3k pragupta ezyang msaroufim [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour 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 |
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. Pull Request resolved: pytorch#162307 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#162117
…or operations (#162651) Also updates the error message to point to the guide. Pull Request resolved: #162651 Approved by: https://github.com/ezyang ghstack dependencies: #162117, #162307
This PR adds an experimental way to register a custom rule for if inductor should partition the graph around an operator. Test Plan: - new test Pull Request resolved: #163310 Approved by: https://github.com/ProExpertProg, https://github.com/BoyuanFeng, https://github.com/eellison ghstack dependencies: #162117, #162307, #162651
This PR adds an experimental way to register a custom rule for if inductor should partition the graph around an operator. Test Plan: - new test Pull Request resolved: #163310 Approved by: https://github.com/ProExpertProg, https://github.com/BoyuanFeng, https://github.com/eellison ghstack dependencies: #162117, #162307, #162651
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. Pull Request resolved: pytorch#162307 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#162117
…or operations (pytorch#162651) Also updates the error message to point to the guide. Pull Request resolved: pytorch#162651 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#162117, pytorch#162307
This PR adds an experimental way to register a custom rule for if inductor should partition the graph around an operator. Test Plan: - new test Pull Request resolved: pytorch#163310 Approved by: https://github.com/ProExpertProg, https://github.com/BoyuanFeng, https://github.com/eellison ghstack dependencies: pytorch#162117, pytorch#162307, pytorch#162651
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. Pull Request resolved: pytorch#162307 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#162117
…or operations (pytorch#162651) Also updates the error message to point to the guide. Pull Request resolved: pytorch#162651 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#162117, pytorch#162307
This PR adds an experimental way to register a custom rule for if inductor should partition the graph around an operator. Test Plan: - new test Pull Request resolved: pytorch#163310 Approved by: https://github.com/ProExpertProg, https://github.com/BoyuanFeng, https://github.com/eellison ghstack dependencies: pytorch#162117, pytorch#162307, pytorch#162651
This PR adds an experimental way to register a custom rule for if inductor should partition the graph around an operator. Test Plan: - new test Pull Request resolved: #163310 Approved by: https://github.com/ProExpertProg, https://github.com/BoyuanFeng, https://github.com/eellison ghstack dependencies: #162117, #162307, #162651
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due to an arange call creating a new Tensor (not DTensor). This PR fixes it by allowing implicit replication of Tensors for the arange call and the one consumer of the arange call (the at::eq call). Test Plan: - new test. Also, F.one_hot(num_classes=-1) is broken so we skip that. Pull Request resolved: pytorch#162307 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#162117
…or operations (pytorch#162651) Also updates the error message to point to the guide. Pull Request resolved: pytorch#162651 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#162117, pytorch#162307
This PR adds an experimental way to register a custom rule for if inductor should partition the graph around an operator. Test Plan: - new test Pull Request resolved: pytorch#163310 Approved by: https://github.com/ProExpertProg, https://github.com/BoyuanFeng, https://github.com/eellison ghstack dependencies: pytorch#162117, pytorch#162307, pytorch#162651
Stack from ghstack (oldest at bottom):
F.one_hot(dtensor) used to run into a mixed DTensor-Tensor operation due
to an arange call creating a new Tensor (not DTensor). This PR fixes it
by allowing implicit replication of Tensors for the arange call and the
one consumer of the arange call (the at::eq call).
Test Plan:
cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @ezyang @msaroufim