From e2d86519694ef5fe05d3ecabeb51f66dcdd21d25 Mon Sep 17 00:00:00 2001 From: Engininja2 <139037756+Engininja2@users.noreply.github.com> Date: Tue, 28 May 2024 22:36:13 -0600 Subject: [PATCH 1/3] Disable Windows+CUDA workaround when compiling for HIPBLAS --- CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dcaddb678..15f2ed738 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,14 +41,16 @@ if (LLAMA_BUILD) RESOURCE DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/llama_cpp ) # Workaround for Windows + CUDA https://github.com/abetlen/llama-cpp-python/issues/563 - install( - FILES $ - DESTINATION ${SKBUILD_PLATLIB_DIR}/llama_cpp - ) - install( - FILES $ - DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/llama_cpp - ) + if(NOT LLAMA_HIPBLAS) + install( + FILES $ + DESTINATION ${SKBUILD_PLATLIB_DIR}/llama_cpp + ) + install( + FILES $ + DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/llama_cpp + ) + endif() if (LLAVA_BUILD) if (LLAMA_CUBLAS OR LLAMA_CUDA) From cbf1a20601fa7e891777ab6e45f95b38284bbd54 Mon Sep 17 00:00:00 2001 From: Engininja2 <139037756+Engininja2@users.noreply.github.com> Date: Wed, 29 May 2024 12:23:46 -0600 Subject: [PATCH 2/3] fix spacing --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15f2ed738..fa046451c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ if (LLAMA_BUILD) RESOURCE DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/llama_cpp ) # Workaround for Windows + CUDA https://github.com/abetlen/llama-cpp-python/issues/563 - if(NOT LLAMA_HIPBLAS) + if (NOT LLAMA_HIPBLAS) install( FILES $ DESTINATION ${SKBUILD_PLATLIB_DIR}/llama_cpp From f77bffaa68068f6c9b978b69e1a94b816e62b9fb Mon Sep 17 00:00:00 2001 From: Engininja2 <139037756+Engininja2@users.noreply.github.com> Date: Sat, 1 Jun 2024 11:14:34 -0600 Subject: [PATCH 3/3] change condition to check for Windows & CUDA Co-authored-by: Andrei --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa046451c..4b9508d40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ if (LLAMA_BUILD) RESOURCE DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/llama_cpp ) # Workaround for Windows + CUDA https://github.com/abetlen/llama-cpp-python/issues/563 - if (NOT LLAMA_HIPBLAS) + if (WIN32 AND (LLAMA_CUDA OR LLAMA_CUBLAS)) install( FILES $ DESTINATION ${SKBUILD_PLATLIB_DIR}/llama_cpp