-
Notifications
You must be signed in to change notification settings - Fork 12k
Compilation error on Nvidia Jetson Nano #4099
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
Comments
What kind of Jetson board are you using ? I might have some Jetsons at work to try on, but I want to check if your and my boards have the same hardware |
I'm using this board: https://developer.nvidia.com/embedded/jetson-nano-developer-kit I would very much appreciate the help! |
i'm in this same boat right now with the latest cuda-10.2 (from apt install nvidia-jetpack) the files are all present in /usr/local/cuda-10.2/ but getting the same errors. I contemplated just doing the ubuntu repository driver installs instead of the jetpack specific variants just to see if it's functional even. |
I'm pretty sure I have exact same ones at work, so I'm gonna try to borrow one, might take couple of days. |
Potentially related?: #4123 EDIT: I've run it with the patch file from this issue, but get some new errors, which I don't know how to solve. Did anyone else make some progress?
|
@staviq any luck so far on your end? |
@rvandernoort nothing conclusive, installing newer cuda (which would solve the problem) on jetson is hacky and unstable Supposedly Nvidia will support more recent cuda in the next release of their jetson software bundle |
You need to provide |
This does not work on my Jetson Xavier, I'm still getting |
@eternitybt are you using CUDA 10? If so, updating it should fix the problem (at least it's now working on my Xavier NX 16GB). |
@vvsotnikov I am indeed still on CUDA 10. It's great to hear that upgrading to CUDA 11 is possible on the Xavier NX from someone who has actually done it! Maybe you have a link to the instructions that worked for you? I find a lot of conflicting information on the internet and am afraid of trying out anything because I do not want to mess up my system. |
@eternitybt I haven't updated it per se, I just installed JetPack 5.1.2 from scratch, it includes CUDA 11. If you could afford wiping your Jetson, that's probably the easiest solution |
I can confirm that after updating to JetPack 5.1.2 and using the command |
Compiling with gcc-10 and g++-10 is successful, which is the highest available version on Jetson nano developer kit. |
#4123 (comment) |
Thanks for all the suggestions, and to conclude how to install on an Nvidia Jetson Nano with ubuntu 18, cuda10.2
|
Why do we need to compile directly from the source code of GCC? I have similar issue in ggml and I can install gcc-8 and gcc-9 from apt-get by
and to build ggml
I hope this can help others who encounter the same issue on the Jetson Nano. |
There is a version restriction on using gcc from jetpack4 to cuda10, and in tx2 I can only use gcc8 and below, and the Ubuntu source gcc lacks these arm functions, so you need to build from source |
@rvandernoort What kind of performance do you get out of this? In my case running it without GPU offloading is actually faster than with it. Do you observe a similar pattern for your Jetson Nano? |
I've done a small test to confirm your hypothesis, but for me the loading time of the model is similar and the GPU inference on a 4-bit quantized model is 3-4 times faster compared to the CPU inference using the server. An issue I did encounter was very slow behaviour when you are closing the RAM max, so maybe model size is the issue? |
I just read your comment sorry. I am running Phi-2 so it should not be a problem with RAM. weird. :/ |
Closing this as my project with the jetson has finished and I managed to compile. |
If anyone else needs to run llama.cpp on a Jetson Nano, I compiled all the advice listed here needed to get it running into a github gist. |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
Please provide a detailed written description of what you were trying to do, and what you expected
llama.cpp
to do.Hi! I'm trying to compile llamacpp on an Nvidia Jetson Nano 2GB with CuBLAS, because I want to use the cuda cores, but I'm facing some issues with compilation.
Current Behavior
Please provide a detailed written description of what
llama.cpp
did, instead.Both make and cmake compilation methods results in various errors.
Environment and Context
Please provide detailed information about your computer setup. This is important in case the issue is not reproducible except for under certain specific conditions.
$ lscpu
$ uname -a
Linux rover-NVIDIA-JETSON 4.9.337-tegra #1 SMP PREEMPT Thu Jun 8 21:19:14 PDT 2023 aarch64 aarch64 aarch64 GNU/Linux
Failure Information (for bugs)
Please help provide information about the failure / bug.
Steps to Reproduce
Please provide detailed steps for reproducing the issue. We are not sitting in front of your screen, so the more detail the better.
Failure Logs
Setting the -arch to
compute_53
in the MakefileI could not find what number I had to insert here for the cpu variable, and removing it also fails.
Similar error to #3880,
I'm not sure what more to do, or if it is even supported, because the Nvidia Jetson Nano is running Ubuntu 18.04 with cuda 10.2, which is older but I cannot upgrade. Would really appreciate if someone could help me figure this out, if I need to provide more information let me know!
The text was updated successfully, but these errors were encountered: