by programmarchy · 2y ago · 0 comments
#ifndef __HIP__
#include <cuda_fp16.h>
#include <cuda_runtime.h>
#else
#include <hip/hip_fp16.h>
#include <hip/hip_runtime.h>
#define cudaSuccess hipSuccess
#define cudaStream_t hipStream_t
#define cudaGetLastError hipGetLastError
#endif
Then your CUDA code works on AMD.