Skip to content

[AsyncAlloc][CUDA] Change memory pool max size error to a warning #17863

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

Merged
merged 2 commits into from
Apr 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions unified-runtime/source/adapters/cuda/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,12 @@ ur_usm_pool_handle_t_::ur_usm_pool_handle_t_(ur_context_handle_t Context,
// only reserved when it's needed for the
// first time (cuMemAllocFromPoolAsync).
#else
// Only error if the user set a value >0 for the maximum size.
// Only warn if the user set a value >0 for the maximum size.
// Otherwise, do nothing.
if (Limits->maxPoolableSize > 0) {
setErrorMessage(
"The memory pool maximum size feature requires CUDA 12.2 or later.",
UR_RESULT_ERROR_ADAPTER_SPECIFIC);
throw UsmAllocationException(UR_RESULT_ERROR_ADAPTER_SPECIFIC);
}
// Set maximum size is effectively ignored.
if (Limits->maxPoolableSize > 0)
logger::warning("The memory pool maximum size feature requires CUDA "
"12.2 or later.\n");
#endif
maxSize = Limits->maxPoolableSize;
size_t chunkSize = 33554432; // 32MB
Expand Down