Skip to content

Replace funcptr comparator with struct in XPUCachingAllocator - #195176

Closed
lakshayg wants to merge 1 commit into
pytorch:mainfrom
lakshayg:inline-block-comparator-xpu
Closed

lakshayg wants to merge 1 commit into
pytorch:mainfrom
lakshayg:inline-block-comparator-xpu

Conversation

@lakshayg

@lakshayg lakshayg commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

In CUDACachingAllocator the Block comparator is a hot function. #195129 optimizes it so that the compiler can inline it. This PR brings the same change to XPUCachingAllocator.

@lakshayg
lakshayg requested a review from Skylion007 August 28, 2026 17:32
@lakshayg lakshayg self-assigned this Aug 28, 2026
@lakshayg lakshayg added ciflow/trunk Trigger trunk jobs on your pull request topic: not user facing topic category labels Aug 28, 2026
@pytorch-bot

pytorch-bot Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit d990b64 with merge base 4380f31 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@Skylion007 Skylion007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please improve the PR description

@lakshayg

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge

@pytorchmergebot

Copy link
Copy Markdown
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

@lakshayg
lakshayg deleted the inline-block-comparator-xpu branch August 28, 2026 20:27
orrangetabby17 pushed a commit to orrangetabby17/pytorch that referenced this pull request Sep 2, 2026
…h#195176)

In `CUDACachingAllocator` the `Block` comparator is a hot function. pytorch#195129 optimizes it so that the compiler can inline it. This PR brings the same change to XPUCachingAllocator.
Pull Request resolved: pytorch#195176
Approved by: https://github.com/Skylion007
Sanskaaar1 pushed a commit to Sanskaaar1/pytorch that referenced this pull request Sep 8, 2026
…h#195176)

In `CUDACachingAllocator` the `Block` comparator is a hot function. pytorch#195129 optimizes it so that the compiler can inline it. This PR brings the same change to XPUCachingAllocator.
Pull Request resolved: pytorch#195176
Approved by: https://github.com/Skylion007
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 Merged open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants