Skip to content

Commit 64c60c5

Browse files
authored
[AsyncAlloc][CUDA] Change memory pool max size error to a warning (#17863)
Warn users over setting the memory pool maximum size property instead of error. This should aid CI which is affected by the memory_pool.cpp e2e test which expects to be able to set this property despite DPC++ being built with a CUDA version that is too old. See this CI error: #17757 (comment) This PR relies on #17095 to be merged for the printing of the warning to be enabled.
1 parent 0fffee9 commit 64c60c5

File tree

1 file changed

+5
-7
lines changed
  • unified-runtime/source/adapters/cuda

1 file changed

+5
-7
lines changed

unified-runtime/source/adapters/cuda/usm.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,14 +440,12 @@ ur_usm_pool_handle_t_::ur_usm_pool_handle_t_(ur_context_handle_t Context,
440440
// only reserved when it's needed for the
441441
// first time (cuMemAllocFromPoolAsync).
442442
#else
443-
// Only error if the user set a value >0 for the maximum size.
443+
// Only warn if the user set a value >0 for the maximum size.
444444
// Otherwise, do nothing.
445-
if (Limits->maxPoolableSize > 0) {
446-
setErrorMessage(
447-
"The memory pool maximum size feature requires CUDA 12.2 or later.",
448-
UR_RESULT_ERROR_ADAPTER_SPECIFIC);
449-
throw UsmAllocationException(UR_RESULT_ERROR_ADAPTER_SPECIFIC);
450-
}
445+
// Set maximum size is effectively ignored.
446+
if (Limits->maxPoolableSize > 0)
447+
logger::warning("The memory pool maximum size feature requires CUDA "
448+
"12.2 or later.\n");
451449
#endif
452450
maxSize = Limits->maxPoolableSize;
453451
size_t chunkSize = 33554432; // 32MB

0 commit comments

Comments
 (0)