-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[re-land][inductor] Refactor and optimize allocation calls (#111117) #111511
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/111511
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit aa12f2e with merge base 74f6f7a ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
dca732d
to
951f2dc
Compare
951f2dc
to
cf3c82b
Compare
…11117) Summary: This is a re-land of pytorch#111117 with updates to our internal tests included. This splits out changes from pytorch#102625 to make things easier to review. This diff creates a `make_allocation()` method that extracts the logic from `make_buffer_allocation()` while allowing us to allocate non-buffer objects. In particular, we will use this to allocate memory pools during memory planning. This diff also includes a small optimization -- if the desired allocation is contiguous, then we emit a call to `empty()` instead of `empty_strided()` with its superfluous stride argument. Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/9ce0ae836d6801a39776897b9e891cd978b28aea Differential Revision: D50429424 fbshipit-source-id: ce5f02240574db6dbbac2dd45a90cf01ac76a3a1
This pull request was exported from Phabricator. Differential Revision: D50429424 |
cf3c82b
to
aa12f2e
Compare
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
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 |
…11117) (pytorch#111511) Summary: This is a re-land of pytorch#111117 with updates to our internal tests included. This splits out changes from pytorch#102625 to make things easier to review. This diff creates a `make_allocation()` method that extracts the logic from `make_buffer_allocation()` while allowing us to allocate non-buffer objects. In particular, we will use this to allocate memory pools during memory planning. This diff also includes a small optimization -- if the desired allocation is contiguous, then we emit a call to `empty()` instead of `empty_strided()` with its superfluous stride argument. Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/9ce0ae836d6801a39776897b9e891cd978b28aea Differential Revision: D50429424 Pull Request resolved: pytorch#111511 Approved by: https://github.com/jansel
…11117) (pytorch#111511) Summary: This is a re-land of pytorch#111117 with updates to our internal tests included. This splits out changes from pytorch#102625 to make things easier to review. This diff creates a `make_allocation()` method that extracts the logic from `make_buffer_allocation()` while allowing us to allocate non-buffer objects. In particular, we will use this to allocate memory pools during memory planning. This diff also includes a small optimization -- if the desired allocation is contiguous, then we emit a call to `empty()` instead of `empty_strided()` with its superfluous stride argument. Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/9ce0ae836d6801a39776897b9e891cd978b28aea Differential Revision: D50429424 Pull Request resolved: pytorch#111511 Approved by: https://github.com/jansel
Summary:
This is a re-land of #111117 with
updates to our internal tests included.
This splits out changes from
#102625 to make things easier to
review.
This diff creates a
make_allocation()
method that extracts the logicfrom
make_buffer_allocation()
while allowing us to allocate non-bufferobjects. In particular, we will use this to allocate memory pools during
memory planning.
This diff also includes a small optimization -- if the desired
allocation is contiguous, then we emit a call to
empty()
instead ofempty_strided()
with its superfluous stride argument.Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/9ce0ae836d6801a39776897b9e891cd978b28aea
Differential Revision: D50429424
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler