From 18e98265103cbc2e196bc1dae9c7e9f5ec2e32ac Mon Sep 17 00:00:00 2001 From: Bhargav Mangipudi Date: Sat, 16 Sep 2023 15:02:13 -0700 Subject: [PATCH] Fix compilation issue with ROCm --- models/ggml/ggml-cuda-ggllm.h | 4 ++++ models/ggml/libfalcon.cpp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/models/ggml/ggml-cuda-ggllm.h b/models/ggml/ggml-cuda-ggllm.h index cc58c9b..c5571a3 100644 --- a/models/ggml/ggml-cuda-ggllm.h +++ b/models/ggml/ggml-cuda-ggllm.h @@ -1,3 +1,7 @@ +#ifdef GGML_USE_HIPBLAS +#define cudaDeviceProp hipDeviceProp_t +#endif + // https://github.com/cmp-nct/ggllm.cpp/blob/master/ggml-cuda.h typedef struct { diff --git a/models/ggml/libfalcon.cpp b/models/ggml/libfalcon.cpp index 696512f..211c9ac 100644 --- a/models/ggml/libfalcon.cpp +++ b/models/ggml/libfalcon.cpp @@ -14,7 +14,11 @@ #include "ggml.h" #include "libfalcon.h" #include "llama-util.h" -#ifdef GGML_USE_CUBLAS +#ifdef GGML_USE_HIPBLAS +#include + +#include "ggml-cuda.h" +#elif GGML_USE_CUBLAS #include #include "ggml-cuda.h"