-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Move config/util to AllocatorConfig for cross-allocator sharing #159553
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
base: gh/guangyey/176/base
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/159553
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Cancelled Job, 2 Unrelated FailuresAs of commit d665023 with merge base 2507ae6 ( CANCELLED JOB - The following job was cancelled. Please retry:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
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. |
constexpr size_t kMinLargeAlloc = | ||
10485760; // allocations between 1 and 10 MiB may use kLargeBuffer | ||
constexpr size_t kRoundLarge = 2097152; // round up large allocations to 2 MiB | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All configs/utils are defined in cpp file, so no BC issue.
c10/core/AllocatorConfig.h
Outdated
return size; | ||
} | ||
|
||
TORCH_CHECK(divisions >= 2, "Only 2 or more divisions are supported"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit should be TORCH_CHECK_VALUE so it raises value error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done.
Adding |
@albanD May I know if this PR is reasonable to you? |
Stack from ghstack (oldest at bottom):
Motivation
Make CUDA and XPU share the same config and code. And allow the other backends to reuse them.