Skip to content

Commit 965e4fb

Browse files
[SYCL] Add extra allocation failure case to physical_mem (#20529)
This commit adds the case for UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY to the cases where the physical_mem ctor will throw an errc::memory_allocation exception. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
1 parent e05e82b commit 965e4fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sycl/source/detail/physical_mem_impl.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ class physical_mem_impl {
4848
&MPhysicalMem);
4949

5050
if (Err == UR_RESULT_ERROR_OUT_OF_RESOURCES ||
51-
Err == UR_RESULT_ERROR_OUT_OF_HOST_MEMORY)
51+
Err == UR_RESULT_ERROR_OUT_OF_HOST_MEMORY ||
52+
Err == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY)
5253
throw sycl::exception(make_error_code(errc::memory_allocation),
5354
"Failed to allocate physical memory.");
5455
Adapter.checkUrResult(Err);

0 commit comments

Comments
 (0)