From 9a01972ba88f565ed78a3bbbe367972435576d8c Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Mon, 3 Nov 2025 00:36:35 -0800 Subject: [PATCH] [SYCL] Add extra allocation failure case to physical_mem 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 --- sycl/source/detail/physical_mem_impl.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sycl/source/detail/physical_mem_impl.hpp b/sycl/source/detail/physical_mem_impl.hpp index 7c926d2634928..3bc4d6865187c 100644 --- a/sycl/source/detail/physical_mem_impl.hpp +++ b/sycl/source/detail/physical_mem_impl.hpp @@ -48,7 +48,8 @@ class physical_mem_impl { &MPhysicalMem); if (Err == UR_RESULT_ERROR_OUT_OF_RESOURCES || - Err == UR_RESULT_ERROR_OUT_OF_HOST_MEMORY) + Err == UR_RESULT_ERROR_OUT_OF_HOST_MEMORY || + Err == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY) throw sycl::exception(make_error_code(errc::memory_allocation), "Failed to allocate physical memory."); Adapter.checkUrResult(Err);