mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-28 21:17:08 +00:00
13 lines
477 B
C
13 lines
477 B
C
#pragma once
|
|
|
|
#include <cuda.h>
|
|
#include <cuda_runtime.h>
|
|
|
|
#define CUDA_CHECK(func) \
|
|
{ \
|
|
auto status = func; \
|
|
if (status != cudaSuccess) { \
|
|
LOG(FATAL) << "CUDA Error : " << cudaGetErrorString(status); \
|
|
} \
|
|
}
|