summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylin <56434533+KyL0N@users.noreply.github.com>2024-01-20 15:01:46 +0800
committerGitHub <noreply@github.com>2024-01-20 09:01:46 +0200
commitcca894f16a5eade15afd07b015e4cb3d8658943f (patch)
tree88d445122895fcc5c1e2cf82a50119df9023dd31
parent381ee195721d8e747ee31a60c0751822b3072f02 (diff)
cuda : fix compile error in jetson platform (#4975)
* cuda: fix compile error in jetson platform * cuda: update comment in ggml-cuda.cu * cuda: update ggml-cuda.cu comment
-rw-r--r--ggml-cuda.cu8
1 files changed, 5 insertions, 3 deletions
diff --git a/ggml-cuda.cu b/ggml-cuda.cu
index b2211d85..ec3837fb 100644
--- a/ggml-cuda.cu
+++ b/ggml-cuda.cu
@@ -12,9 +12,6 @@
#include <vector>
#include <map>
#include <array>
-#include "ggml-cuda.h"
-#include "ggml.h"
-#include "ggml-backend-impl.h"
#if defined(GGML_USE_HIPBLAS)
#include <hip/hip_runtime.h>
@@ -118,6 +115,11 @@
#endif // defined(GGML_USE_HIPBLAS)
+// ggml-cuda need half type so keep ggml headers include at last
+#include "ggml-cuda.h"
+#include "ggml.h"
+#include "ggml-backend-impl.h"
+
#define CUDART_HMAX 11070 // CUDA 11.7, min. ver. for which __hmax and __hmax2 are known to work (may be higher than needed)
#define CC_PASCAL 600