14#include <source_location>
24 using std::runtime_error::runtime_error;
34 std::source_location loc = std::source_location::current()) {
36 throw GPUError(std::format(
"GPU error in {}:{} — {}", loc.file_name(), loc.line(),
Unified GPU portability layer between CUDA and HIP with host fallback stubs.
int hipError_t
Return error type for host fallback emulation.
Definition GPUPortability.hpp:54
constexpr int hipSuccess
Successful execution code.
Definition GPUPortability.hpp:56
const char * hipGetErrorString(hipError_t err) noexcept
Translates an error code to a human-readable description.
Definition GPUPortability.hpp:148
Exception type for GPU runtime errors.
Definition GPUErrorCheck.hpp:22
Definition DeviceBuffer.hpp:16
void hipCheck(hipError_t result, std::source_location loc=std::source_location::current())
Validates a HIP/CUDA runtime call result and throws GPUError on failure.
Definition GPUErrorCheck.hpp:33