Files
github-actions[bot] f9fcc7adab sunnypilot v2026.002.000 release
date: 2026-06-28T09:48:35
master commit: da6313dbe95b3f24bb5d8018b0e5f950f5823ca7
2026-06-28 09:49:29 +08:00

18 lines
496 B
Plaintext

#pragma once
#include "../ops/ops.cuh"
#include <iostream>
#define CHECK_CUDA_ERROR(val) check((val), #val, __FILE__, __LINE__)
template <typename T>
void check(T err, char const* const func, char const* const file,
int const line)
{
if (err != hipSuccess)
{
std::cerr << "HIP Runtime Error at: " << file << ":" << line
<< std::endl;
std::cerr << hipGetErrorString(err) << " " << func << std::endl;
//std::exit(EXIT_FAILURE);
}
}