Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llama: replace cuda feature with env var #266

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Feb 2, 2024

This commit removes the cuda feature and replaces it with an
environment variable LLM_CHAIN_CUDA.It also adds an additional
environment variable LLM_CHAIN_CUDA_LIB_PATH which should be set to
the path of the CUDA library directory, and include link libraries
required for CUDA. Finally -fPIC is added to CMAKE_CUDA_FLAGS.

The motivation for this is that having the feature cuda was not
working as this will cause the build to fail if infact the CUDA
library is not installed. I think that this may not have been the case
with earlier versions of llama.cpp and perhaps why this was not an
issue before.

This commit removes the `cuda` feature and replaces it with an
environment variable `LLM_CHAIN_CUDA`.It also adds an additional
environment variable `LLM_CHAIN_CUDA_LIB_PATH` which should be set to
the path of the CUDA library directory, and include link libraries
required for CUDA. Finally `-fPIC` is added to `CMAKE_CUDA_FLAGS`.

The motivation for this is that having the feature `cuda` was not
working as this will cause the build to fail if infact the CUDA
library is not installed. I think that this may not have been the case
with earlier versions of llama.cpp and perhaps why this was not an
issue before.

Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
@danbev danbev changed the title llama: set CUDA flags and link to CUDA libraries llama: replace cuda feature with env var Feb 2, 2024
@williamhogman williamhogman merged commit a416579 into sobelio:main Feb 2, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants