Repository navigation
Closed
Labels
Description
Prerequisites
Please answer the following questions for yourself before submitting an issue.
- I am running the latest code. Development is very rapid so there are no tagged versions as of now.
- I carefully followed the README.md.
- I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
- I reviewed the Discussions, and have a new bug or useful enhancement to share.
Expected Behavior
When I run
cmake3 .. -DLLAMA_CUBLAS=ONIt will success normally.
Current Behavior
It got errors (see details at below). But when I replace CUDA::cublasLt in CMakeLists.txt with the absolute path, the bug fixed. But I think it is not a good solution.
$ vi ../CMakeLists.txt # replace CUDA::cublasLt with /usr/local/cuda/lib64/libcublas.so
$ cmake3 .. -DLLAMA_CUBLAS=ON
-- cuBLAS found at /usr/local/cuda/lib64
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- x86 detected
-- GGML CUDA sources found, configuring CUDA architecture
-- Configuring done
-- Generating done
-- Build files have been written to: /users/fumiama/src/llama.cpp/buildEnvironment and Context
-
Physical (or virtual) hardware you are using: Centos7.6
-
Operating System, e.g. for Linux:
$ uname -a
Linux localhost.localdomain 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
- SDK version, e.g. for Linux:
$ cmake3 --version
cmake3 version 3.17.5
CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ gcc --version
gcc (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Jan__6_16:45:21_PST_2023
Cuda compilation tools, release 12.0, V12.0.140
Build cuda_12.0.r12.0/compiler.32267302_0
Failure Information (for bugs)
-- cuBLAS found
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- x86 detected
-- GGML CUDA sources found, configuring CUDA architecture
-- Configuring done
CMake Error at CMakeLists.txt:317 (add_library):
Target "llama" links to target "FindCUDA::cublasLt" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:317 (add_library):
Target "llama" links to target "FindCUDA::cublasLt" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at tests/CMakeLists.txt:3 (add_executable):
Target "test-tokenizer-0" links to target "FindCUDA::cublasLt" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
tests/CMakeLists.txt:10 (llama_add_test)
CMake Error at tests/CMakeLists.txt:3 (add_executable):
Target "test-tokenizer-0" links to target "FindCUDA::cublasLt" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
tests/CMakeLists.txt:10 (llama_add_test)
CMake Error at tests/CMakeLists.txt:3 (add_executable):
Target "test-quantize" links to target "FindCUDA::cublasLt" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
Call Stack (most recent call first):
tests/CMakeLists.txt:9 (llama_add_test)
CMake Error at tests/CMakeLists.txt:3 (add_executable):
Target "test-quantize" links to target "FindCUDA::cublasLt" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
Call Stack (most recent call first):
tests/CMakeLists.txt:9 (llama_add_test)
CMake Error at examples/main/CMakeLists.txt:2 (add_executable):
Target "main" links to target "FindCUDA::cublasLt" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at examples/main/CMakeLists.txt:2 (add_executable):
Target "main" links to target "FindCUDA::cublasLt" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at examples/quantize/CMakeLists.txt:2 (add_executable):
Target "quantize" links to target "FindCUDA::cublasLt" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at examples/quantize/CMakeLists.txt:2 (add_executable):
Target "quantize" links to target "FindCUDA::cublasLt" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at examples/quantize-stats/CMakeLists.txt:2 (add_executable):
Target "quantize-stats" links to target "FindCUDA::cublasLt" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at examples/quantize-stats/CMakeLists.txt:2 (add_executable):
Target "quantize-stats" links to target "FindCUDA::cublasLt" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at examples/perplexity/CMakeLists.txt:2 (add_executable):
Target "perplexity" links to target "FindCUDA::cublasLt" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at examples/perplexity/CMakeLists.txt:2 (add_executable):
Target "perplexity" links to target "FindCUDA::cublasLt" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at examples/embedding/CMakeLists.txt:2 (add_executable):
Target "embedding" links to target "FindCUDA::cublasLt" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at examples/embedding/CMakeLists.txt:2 (add_executable):
Target "embedding" links to target "FindCUDA::cublasLt" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at pocs/vdot/CMakeLists.txt:2 (add_executable):
Target "vdot" links to target "FindCUDA::cublasLt" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at pocs/vdot/CMakeLists.txt:2 (add_executable):
Target "vdot" links to target "FindCUDA::cublasLt" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:305 (add_library):
Target "ggml" links to target "FindCUDA::cublasLt" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at examples/CMakeLists.txt:13 (add_library):
Target "common" links to target "FindCUDA::cublasLt" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at examples/CMakeLists.txt:13 (add_library):
Target "common" links to target "FindCUDA::cublasLt" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Reacted by 8188
Activity
slaren commentedon Apr 20, 2023
I cannot reproduce this issue with cmake 3.22.1, gcc 11.3 and nvcc 12.1
fumiama commentedon Apr 20, 2023
Sorry, I got a mistake. The version of cmake I'm using is
[-][Bug(CMake)] CUDA::cublasLt not found but can be specified absolutely[/-][+][Bug(CMake 3.17)] CUDA::cublasLt not found but can be specified absolutely[/+]fumiama commentedon Apr 20, 2023
And I tested again under cmake
3.26.3, no problem this time. Maybe it's also a cmake3.17.xissue.Rubiel1 commentedon Feb 14, 2024
I have the same problem, with CMake 3.17
martin2384798 commentedon Mar 20, 2024
I have the same problem, with CMake 3.22.2, 3.23.2, 3.24.2.
Other version info: gcc 9.4.0 nvcc V11.8.89
cmake .. -DLLAMA_CUBLAScould succeed if I replace CUDA::cublasLt with absolute path of libcublas.soyoucanyouupsb commentedon Apr 21, 2024
I have the same problem, with CMake 3.17 too!!!!
I specified the following path directly as an absolute path:
set(LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} CUDA::cudart CUDA::cublas CUDA::cublasLt)
====>
set(LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} CUDA::cudart CUDA::cublas "/usr/local/cuda-12.4/lib64/libcublasLt.so")
The CMake configuration succeeded.
github-actions commentedon Jun 6, 2024
This issue was closed because it has been inactive for 14 days since being marked as stale.
graph: keep the fused attention op on its layer's device (engine ggml…
hrx: a fused dispatch may not swallow a value the caller asked to rea…
hrx: let a caller declare a value it will read back, and drop the TOP…