diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f80f38..faeb0e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,12 @@ add_subdirectory(third_party/sentencepiece) if (GGML_CUBLAS) add_compile_definitions(GGML_USE_CUBLAS) - set(CUDA_ARCHITECTURES "52;61;70;75;80;86" CACHE STRING "chatglm: cuda architectures to compile") + enable_language(CUDA) + if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "11.8") + set(CUDA_ARCHITECTURES "52;61;70;75;80;86;90" CACHE STRING "chatglm: cuda architectures to compile") + else () + set(CUDA_ARCHITECTURES "52;61;70;75;80;86" CACHE STRING "chatglm: cuda architectures to compile") + endif () set_property(TARGET ggml PROPERTY CUDA_ARCHITECTURES ${CUDA_ARCHITECTURES}) endif () diff --git a/README.md b/README.md index d090989..67addd9 100644 --- a/README.md +++ b/README.md @@ -274,7 +274,7 @@ cmake -B build -DGGML_CUBLAS=ON -DCUDA_ARCHITECTURES="80" # for A100 cmake -B build -DGGML_CUBLAS=ON -DCUDA_ARCHITECTURES="70;75" # compatible with both V100 and T4 ``` -To find out the CUDA architecture of your GPU device, see [Matching CUDA arch and CUDA gencode for various NVIDIA architectures](https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/). +To find out the CUDA architecture of your GPU device, see [Your GPU Compute Capability](https://developer.nvidia.com/cuda-gpus). **Metal**