14#include "arccore/accelerator_native/HipAccelerator.h"
16#include "arccore/base/FatalErrorException.h"
20namespace Arcane::Accelerator::Hip
26void arcaneCheckHipErrors(
const TraceInfo& ti, hipError_t e)
28 if (e != hipSuccess) {
29 ARCCORE_FATAL(
"HIP Error trace={0} e={1} str={2}", ti, e, hipGetErrorString(e));
33void arcaneCheckHipErrorsNoThrow(
const TraceInfo& ti, hipError_t e)
37 String str = String::format(
"HIP Error trace={0} e={1} str={2}", ti, e, hipGetErrorString(e));
38 FatalErrorException ex(ti, str);
39 ex.explain(std::cerr);
#define ARCCORE_FATAL(...)
Macro throwing a FatalErrorException.