Skip to content

Commit

Permalink
Add default fallback error msg for out-of-resources
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeWeb committed Feb 5, 2024
1 parent c9d329b commit 5b7cbec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sycl/source/detail/error_handling/error_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//

#include "error_handling.hpp"
#include "sycl/detail/pi.h"

#include <detail/plugin.hpp>
#include <sycl/backend_types.hpp>
Expand Down Expand Up @@ -67,6 +68,10 @@ void handleOutOfResources(const device_impl &DeviceImpl, pi_kernel Kernel,
PI_ERROR_OUT_OF_RESOURCES);
}
}
// Fallback
constexpr pi_result Error = PI_ERROR_OUT_OF_RESOURCES;
throw runtime_error(
"PI backend failed. PI backend returns: " + codeToString(Error), Error);
}

void handleInvalidWorkGroupSize(const device_impl &DeviceImpl, pi_kernel Kernel,
Expand Down

0 comments on commit 5b7cbec

Please sign in to comment.