-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[BE] Replace lib with TORCH_INSTALL_LIB_DIR #158235
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/158235
Note: Links to docs will display an error until the docs builds have been completed. ❌ 5 New Failures, 1 Unrelated FailureAs of commit 1c61385 with merge base 826f12b ( NEW FAILURES - The following jobs have failed:
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. |
@pytorchbot merge -f "failures are unrelated" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Added `all_to_all_vdev_2d_offset`, which: Perform a 2D AllToAllv operation, with input split and offset information provided on device. The input offsets need not to be exact prefix sum of the input splits, i.e. paddings are allowed between the splitted chunks. The paddings, however, will not be transferred to peer ranks. In Mixure of Experts models, this operation can be used to combine tokens processed by experts on remote ranks. This operation can be viewed as an "reverse" operation to the `all_to_all_vdev_2d` operation (which shuffles tokens to experts). The change may seem a bit dense, sorry. But it is mainly two changes: 1. templating existing device functions (to use provided input offset or calculate it) 2. generalizing variable names, e.g. npes, ne --> minor_size, major_size, so that I can use the same alltoall function for matrix of (nranks, ne) as well as matrix of (ne, nranks). Pull Request resolved: #156881 Approved by: https://github.com/ngimel ghstack dependencies: #158234, #158235, #156743
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): Putting both the dispatch API and combine API in battlefield, one following the other, i.e. ``` all_to_all_vdev_2d(inp, out, inp_splits, out_splits_offsets, ...) all_to_all_vdev_2d_offset( input=out, out=combine_out, in_splits_offsets=out_splits_offsets, out_splits_offsets=combine_out_splits_offsets ) ``` Here the `out_splits_offsets` from dispatch perfectly serves as the `in_splits_offsets` argument for combine. Then we assert that the output of combine is exactly the same as the original input to shuffle, and combine's output splits are exactly the same as the original input splits. It works! Pull Request resolved: #157026 Approved by: https://github.com/Skylion007, https://github.com/ngimel ghstack dependencies: #158234, #158235, #156743, #156881
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): Use torch.randn to fill input buffer. Pull Request resolved: #157029 Approved by: https://github.com/fegin, https://github.com/ngimel ghstack dependencies: #158234, #158235, #156743, #156881, #157026
Added `all_to_all_vdev_2d_offset`, which: Perform a 2D AllToAllv operation, with input split and offset information provided on device. The input offsets need not to be exact prefix sum of the input splits, i.e. paddings are allowed between the splitted chunks. The paddings, however, will not be transferred to peer ranks. In Mixure of Experts models, this operation can be used to combine tokens processed by experts on remote ranks. This operation can be viewed as an "reverse" operation to the `all_to_all_vdev_2d` operation (which shuffles tokens to experts). The change may seem a bit dense, sorry. But it is mainly two changes: 1. templating existing device functions (to use provided input offset or calculate it) 2. generalizing variable names, e.g. npes, ne --> minor_size, major_size, so that I can use the same alltoall function for matrix of (nranks, ne) as well as matrix of (ne, nranks). Pull Request resolved: #156881 Approved by: https://github.com/ngimel ghstack dependencies: #158234, #158235, #156743
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): Putting both the dispatch API and combine API in battlefield, one following the other, i.e. ``` all_to_all_vdev_2d(inp, out, inp_splits, out_splits_offsets, ...) all_to_all_vdev_2d_offset( input=out, out=combine_out, in_splits_offsets=out_splits_offsets, out_splits_offsets=combine_out_splits_offsets ) ``` Here the `out_splits_offsets` from dispatch perfectly serves as the `in_splits_offsets` argument for combine. Then we assert that the output of combine is exactly the same as the original input to shuffle, and combine's output splits are exactly the same as the original input splits. It works! Pull Request resolved: #157026 Approved by: https://github.com/Skylion007, https://github.com/ngimel ghstack dependencies: #158234, #158235, #156743, #156881
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): Use torch.randn to fill input buffer. Pull Request resolved: #157029 Approved by: https://github.com/fegin, https://github.com/ngimel ghstack dependencies: #158234, #158235, #156743, #156881, #157026
Stack from ghstack (oldest at bottom):
Their values are actually the same. Just staying in line with other
INSTALL
commands.