Skip to content

[Windows / Pycharm] llama_cpp_python installs and runs successfully without BLAS backend, but does not work with cuBLAS flags #228

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

Closed
4 tasks done
technicolor-twelve opened this issue May 17, 2023 · 6 comments
Labels
build duplicate This issue or pull request already exists hardware Hardware specific issue windows A Windoze-specific issue

Comments

@technicolor-twelve
Copy link

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

I was able to run pip install llama-cpp-python successfully in PyCharm Terminal and use it in my Python code, so when I saw that additional flags needed to be set for cuBLAS, I expected the following code to run successfully:

$env:CMAKE_ARGS='-DLLAMA_CUBLAS=on'
$env:FORCE_CMAKE=1
$env:LLAMA_CUBLAS=1
pip install llama-cpp-python

Current Behavior

I'm still getting the BLAS = 0 indicator, based on the printout of the terminal:
AVX = 1 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | VSX = 0 |

Environment and Context

I'm running PyCharm 2022.2 with Python 3.9, and I have llama-cpp-python 0.1.50 installed. I have an NVIDIA GeForce RTX 3070 and have been able to get cuBLAS up and running with the regular llama.cpp.

@technicolor-twelve technicolor-twelve changed the title [Windows / Pycharm] llama_cpp_python installs and runs successfully, but does not work with cuBLAS flags [Windows / Pycharm] llama_cpp_python installs and runs successfully without BLAS backend, but does not work with cuBLAS flags May 17, 2023
@gjmulder
Copy link
Contributor

Can we see the output of your package build with the --verbose flag added?

@gjmulder gjmulder added build hardware Hardware specific issue labels May 18, 2023
@technicolor-twelve
Copy link
Author

@gjmulder This is the output when I run pip install llama-cpp-python with the previous flags enabled. Is this what you're looking for?

llama-cpp-python pip install output.txt

@abetlen
Copy link
Owner

abetlen commented May 18, 2023

@technicolor-twelve try pip install llama-cpp-python --force-reinstall --upgrade --no-cache-dir as it's using a cached version of the package.

@technicolor-twelve
Copy link
Author

That forced a new install, though now when I run from llama_cpp import Llama I get the following runtime error:

llama runtime error.txt

Which is weird since I could navigate to the referenced and see the .dll file there. I tried adding an os.add_dll_directory to specifically include the path but the error still remains.

@gjmulder gjmulder added the windows A Windoze-specific issue label May 18, 2023
@gjmulder
Copy link
Contributor

That looks like a path issue. Can you review #225, please?

@gjmulder gjmulder added the duplicate This issue or pull request already exists label May 23, 2023
@technicolor-twelve
Copy link
Author

technicolor-twelve commented May 24, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build duplicate This issue or pull request already exists hardware Hardware specific issue windows A Windoze-specific issue
Projects
None yet
Development

No branches or pull requests

3 participants