Skip to content

Generalize support of background thread in pinned allocator#160505

Closed
guangyey wants to merge 3 commits intogh/guangyey/184/basefrom
gh/guangyey/184/head
Closed

Generalize support of background thread in pinned allocator#160505
guangyey wants to merge 3 commits intogh/guangyey/184/basefrom
gh/guangyey/184/head

Conversation

@guangyey
Copy link
Collaborator

@guangyey guangyey commented Aug 13, 2025

Stack from ghstack (oldest at bottom):

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.

@pytorch-bot
Copy link

pytorch-bot bot commented Aug 13, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure, 1 Unrelated Failure

As of commit f9c1040 with merge base 199e9ab (image):

NEW FAILURE - The following job has failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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

guangyey added a commit that referenced this pull request Aug 13, 2025
ghstack-source-id: ae25264
Pull Request resolved: #160505
guangyey added a commit that referenced this pull request Aug 13, 2025
ghstack-source-id: 8cdbbfe
Pull Request resolved: #160505
@guangyey guangyey changed the title Support background thread for other backends Support background thread for XPU backend Aug 13, 2025
guangyey added a commit that referenced this pull request Aug 13, 2025
ghstack-source-id: 54b3152
Pull Request resolved: #160505
@guangyey guangyey added ciflow/xpu Run XPU CI tasks release notes: xpu release notes category ciflow/trunk Trigger trunk jobs on your pull request labels Aug 13, 2025
@guangyey guangyey requested a review from albanD August 13, 2025 06:55
@guangyey guangyey changed the title Support background thread for XPU backend Support background thread in pinned allocator for XPU backend Aug 13, 2025
@guangyey guangyey changed the title Support background thread in pinned allocator for XPU backend Generalize support of background thread in pinned allocator Aug 13, 2025
@guangyey guangyey requested a review from ezyang August 13, 2025 07:16
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
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.

Thanks!
FYI @zyan0 since the original feature has no test, hopefully we're not breaking you?

@albanD
Copy link
Collaborator

albanD commented Aug 13, 2025

@pytorchbot merge

@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

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@guangyey
Copy link
Collaborator Author

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 2 checks: pull / linux-jammy-py3.13-clang12 / test (default, 2, 5, linux.4xlarge), xpu / linux-jammy-xpu-2025.1-py3.9 / test (default, 5, 6, linux.idc.xpu)

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

chuanhaozhuge pushed a commit that referenced this pull request Aug 14, 2025
# 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
chuanhaozhuge pushed a commit that referenced this pull request Aug 18, 2025
# 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
can-gaa-hou pushed a commit to can-gaa-hou/pytorch that referenced this pull request Aug 22, 2025
…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
pytorchmergebot pushed a commit that referenced this pull request Aug 22, 2025
# Motivation
#160505 enables background threads for XPU host allocator. However, it will hang on Windows during program exit. Now disable it until we narrow down the issue.

Pull Request resolved: #161242
Approved by: https://github.com/EikanWang
@github-actions github-actions bot deleted the gh/guangyey/184/head branch September 14, 2025 02:13
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
…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
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
# Motivation
pytorch#160505 enables background threads for XPU host allocator. However, it will hang on Windows during program exit. Now disable it until we narrow down the issue.

Pull Request resolved: pytorch#161242
Approved by: https://github.com/EikanWang
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 ciflow/xpu Run XPU CI tasks Merged open source release notes: xpu release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants