[PyTorch Pinned Allocator] Add support of background thread to process events#135524
[PyTorch Pinned Allocator] Add support of background thread to process events#135524banitag1 wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/135524
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit fbb1062 with merge base b76d1b7 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D62396585 |
|
@pytorchbot label "topic: not user facing |
|
@pytorchbot label "topic: not user facing" |
|
This pull request was exported from Phabricator. Differential Revision: D62396585 |
83bbb0c to
a526dba
Compare
a526dba to
b53d1ce
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62396585 |
…s events (pytorch#135524) Summary: Pull Request resolved: pytorch#135524 Currently we process events in the regular allocation path and we call cudaEventQuery to check on the events and this path can take some locks in libcuda driver. Its not entirely needed to do process events in the allocation path, we could move this to a background thread and keep processing events regularly and put the freed block to the free list. Reviewed By: mrajpal Differential Revision: D62396585
|
This pull request was exported from Phabricator. Differential Revision: D62396585 |
b53d1ce to
fbb1062
Compare
|
@pytorchbot merge -f 'Landed internally' (Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally) |
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 |
…s events (pytorch#135524) Summary: Currently we process events in the regular allocation path and we call cudaEventQuery to check on the events and this path can take some locks in libcuda driver. Its not entirely needed to do process events in the allocation path, we could move this to a background thread and keep processing events regularly and put the freed block to the free list. Differential Revision: D62396585 Pull Request resolved: pytorch#135524 Approved by: https://github.com/zyan0
# Motivation #135524 only introduces the support of background thread for CUDA, this PR intends to support it for other backend such as XPU as well. Pull Request resolved: #160505 Approved by: https://github.com/albanD
# Motivation #135524 only introduces the support of background thread for CUDA, this PR intends to support it for other backend such as XPU as well. Pull Request resolved: #160505 Approved by: https://github.com/albanD
# Motivation #135524 only introduces the support of background thread for CUDA, this PR intends to support it for other backend such as XPU as well. Pull Request resolved: #160505 Approved by: https://github.com/albanD
…160505) # Motivation pytorch#135524 only introduces the support of background thread for CUDA, this PR intends to support it for other backend such as XPU as well. Pull Request resolved: pytorch#160505 Approved by: https://github.com/albanD
…160505) # Motivation pytorch#135524 only introduces the support of background thread for CUDA, this PR intends to support it for other backend such as XPU as well. Pull Request resolved: pytorch#160505 Approved by: https://github.com/albanD
Summary: Currently we process events in the regular allocation path and we call cudaEventQuery to check on the events and this path can take some locks in libcuda driver. Its not entirely needed to do process events in the allocation path, we could move this to a background thread and keep processing events regularly and put the freed block to the free list.
Differential Revision: D62396585