From 9fdaa1d2501a2c4a030af6d34e97b2e4766b27c4 Mon Sep 17 00:00:00 2001 From: Henri Vasserman Date: Sat, 27 May 2023 19:17:53 +0300 Subject: [PATCH] Add more defs For forward compatibility #1607 --- ggml-cuda.cu | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ggml-cuda.cu b/ggml-cuda.cu index 4b4c678ea..1253f0861 100644 --- a/ggml-cuda.cu +++ b/ggml-cuda.cu @@ -25,14 +25,18 @@ #define cublasSetStream hipblasSetStream #define cublasSgemm hipblasSgemm #define cublasStatus_t hipblasStatus_t +#define cudaDeviceProp hipDeviceProp_t #define cudaDeviceSynchronize hipDeviceSynchronize #define cudaError_t hipError_t -#define cudaEvent_t hipEvent_t #define cudaEventCreateWithFlags hipEventCreateWithFlags #define cudaEventDisableTiming hipEventDisableTiming #define cudaEventRecord hipEventRecord +#define cudaEvent_t hipEvent_t #define cudaFree hipFree #define cudaFreeHost hipHostFree +#define cudaGetDevice hipGetDevice +#define cudaGetDeviceCount hipGetDeviceCount +#define cudaGetDeviceProperties hipGetDeviceProperties #define cudaGetErrorString hipGetErrorString #define cudaGetLastError hipGetLastError #define cudaMalloc hipMalloc @@ -43,11 +47,12 @@ #define cudaMemcpyDeviceToHost hipMemcpyDeviceToHost #define cudaMemcpyHostToDevice hipMemcpyHostToDevice #define cudaOccupancyMaxPotentialBlockSize hipOccupancyMaxPotentialBlockSize -#define cudaStream_t hipStream_t +#define cudaSetDevice hipSetDevice #define cudaStreamCreateWithFlags hipStreamCreateWithFlags #define cudaStreamNonBlocking hipStreamNonBlocking #define cudaStreamSynchronize hipStreamSynchronize #define cudaStreamWaitEvent hipStreamWaitEvent +#define cudaStream_t hipStream_t #define cudaSuccess hipSuccess #else #include