I’ve installed all deps using sdk manager however I was not able to flash the system using the usbc cable so I flashed it on my own using an usb device, then installing the OS in the sd-card.
After installing all deps using the sdk manager i’ve installed ollama and during installation I saw:
WARNING: Unsupported JetPack version detected. GPU may not be supported
I comfirmed that GPU was not used nor accessed running models using ollama so I decided to build ollama from source
However following this guide im having issues:
[ 31%] Building CXX object _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv8.6_2.dir/ggml-cpu/arch/arm/repack.cpp.o
[ 32%] Linking CXX shared module ../../../../bin/libggml-cpu-armv8.6_2.so
[ 32%] Built target ggml-cpu-armv8.6_2
gmake[4]: *** [CMakeFiles/Makefile2:2277: _deps/llama_cpp-build/tools/server/CMakeFiles/llama-server.dir/rule] Error 2
gmake[3]: *** [Makefile:703: llama-server] Error 2
gmake[2]: *** [CMakeFiles/ollama-llama-server-local.dir/build.make:95: ollama-llama-server-local-prefix/src/ollama-llama-server-local-stamp/ollama-llama-server-local-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:193: CMakeFiles/ollama-llama-server-local.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
I’m interested in running a LLM using GPU but so far I could not. I don’t have too much experience in LLMs alone but been playing around with ollama in my laptop x86_64 arch and I purchased this board specifically for this. Please help me to figure out the cause
zigor@localhost:~/src-ollama$ cmake -B build .
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/zigor/src-ollama/build
zigor@localhost:~/src-ollama$ cmake --version
cmake version 4.4.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
zigor@localhost:~/src-ollama$ cmake --build build --parallel 8
[ 11%] Building Ollama Go binary
[ 11%] Performing update step for 'ollama-llama-cpp-source'
-- Already at requested tag: b10864
[ 16%] Performing patch step for 'ollama-llama-cpp-source'
-- llama/compat: 001-llama-cpp-hooks.patch already applied, skipping
-- llama/compat: models/003-llama-cpp-laguna-metal.patch already applied, skipping
[ 22%] No configure step for 'ollama-llama-cpp-source'
[ 27%] No build step for 'ollama-llama-cpp-source'
[ 33%] No install step for 'ollama-llama-cpp-source'
[ 38%] Completed 'ollama-llama-cpp-source'
[ 50%] Built target ollama-llama-cpp-source
[ 55%] Performing configure step for 'ollama-llama-server-local'
[ 55%] Built target ollama-go
-- llama.cpp version: 0.4.0-dev
CMAKE_BUILD_TYPE=Release
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: aarch64
-- GGML_SYSTEM_ARCH: ARM
-- Including CPU backend
-- ARM detected
-- Checking for ARM features using flags:
-- -march=armv8-a
-- Adding CPU backend variant ggml-cpu-armv8.0_1: -march=armv8-a
-- ARM detected
-- Checking for ARM features using flags:
-- -march=armv8.2-a+dotprod
-- Adding CPU backend variant ggml-cpu-armv8.2_1: -march=armv8.2-a+dotprod GGML_USE_DOTPROD
-- ARM detected
-- Checking for ARM features using flags:
-- -march=armv8.2-a+dotprod+fp16
-- Adding CPU backend variant ggml-cpu-armv8.2_2: -march=armv8.2-a+dotprod+fp16 GGML_USE_DOTPROD;GGML_USE_FP16_VECTOR_ARITHMETIC
-- ARM detected
-- Checking for ARM features using flags:
-- -march=armv8.2-a+dotprod+fp16+sve
-- Adding CPU backend variant ggml-cpu-armv8.2_3: -march=armv8.2-a+dotprod+fp16+sve GGML_USE_DOTPROD;GGML_USE_FP16_VECTOR_ARITHMETIC;GGML_USE_SVE
-- ARM detected
-- Checking for ARM features using flags:
-- -march=armv8.6-a+dotprod+fp16+sve+i8mm
-- Adding CPU backend variant ggml-cpu-armv8.6_1: -march=armv8.6-a+dotprod+fp16+sve+i8mm GGML_USE_DOTPROD;GGML_USE_FP16_VECTOR_ARITHMETIC;GGML_USE_SVE;GGML_USE_MATMUL_INT8
-- ARM detected
-- Checking for ARM features using flags:
-- -march=armv8.6-a+dotprod+fp16+sve+i8mm+sve2
-- Adding CPU backend variant ggml-cpu-armv8.6_2: -march=armv8.6-a+dotprod+fp16+sve+i8mm+sve2 GGML_USE_DOTPROD;GGML_USE_FP16_VECTOR_ARITHMETIC;GGML_USE_SVE;GGML_USE_MATMUL_INT8;GGML_USE_SVE2
-- ARM detected
-- Checking for ARM features using flags:
-- -march=armv9.2-a+dotprod+fp16+sve+i8mm+sme
-- Adding CPU backend variant ggml-cpu-armv9.2_1: -march=armv9.2-a+dotprod+fp16+sve+i8mm+sme GGML_USE_DOTPROD;GGML_USE_FP16_VECTOR_ARITHMETIC;GGML_USE_SVE;GGML_USE_MATMUL_INT8;GGML_USE_SME
-- ARM detected
-- Checking for ARM features using flags:
-- -march=armv9.2-a+dotprod+fp16+sve+i8mm+sve2+sme
-- Adding CPU backend variant ggml-cpu-armv9.2_2: -march=armv9.2-a+dotprod+fp16+sve+i8mm+sve2+sme GGML_USE_DOTPROD;GGML_USE_FP16_VECTOR_ARITHMETIC;GGML_USE_SVE;GGML_USE_MATMUL_INT8;GGML_USE_SVE2;GGML_USE_SME
-- ggml version: 0.23.0
-- ggml commit: 5d806aa25
CMake Warning (author) at CMakeLists.txt:617 (install):
Target ggml has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
This warning is for project developers. Use -Wno-author to suppress it.
CMake Warning (author) at CMakeLists.txt:617 (install):
Target llama has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
This warning is for project developers. Use -Wno-author to suppress it.
CMake Warning (author) at CMakeLists.txt:617 (install):
Target mtmd has PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION.
This warning is for project developers. Use -Wno-author to suppress it.
CMake Warning (author) at CMakeLists.txt:617 (install):
Target mtmd has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
This warning is for project developers. Use -Wno-author to suppress it.
-- Configuring done (0.2s)
-- Generating done (0.5s)
-- Build files have been written to: /home/zigor/src-ollama/build/llama-server-local
[ 61%] Performing build step for 'ollama-llama-server-local'
[ 0%] Built target ggml-cpu-armv8.6_1-feats
[ 1%] Built target ggml-cpu-armv8.0_1-feats
[ 1%] Built target ggml-cpu-armv9.2_2-feats
[ 2%] Built target ggml-cpu-armv8.2_1-feats
[ 3%] Built target ggml-cpu-armv8.2_2-feats
[ 2%] Built target vendor-hash
[ 4%] Built target ggml-cpu-armv8.2_3-feats
[ 5%] Built target ggml-base
[ 5%] Built target ggml-cpu-armv9.2_1-feats
[ 5%] Built target ggml-cpu-armv8.6_2-feats
[ 6%] Provisioning UI assets
[ 7%] Built target llama-common-base
[ 7%] Built target cpp-httplib
CMake Warning at /home/zigor/src-ollama/build/_deps/llama_cpp-src/scripts/ui-assets.cmake:533 (message):
UI: no assets available - building without an embedded UI. In a
disconnected environment, download the pre-built UI from a llama.cpp
release at https://github.com/ggml-org/llama.cpp/releases and extract to
tools/ui/dist.
-- UI: embedded 0 assets
[ 7%] Built target llama-ui-assets
[ 7%] Building C object _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_2.dir/ggml-cpu/ggml-cpu.c.o
cc1: error: invalid feature modifier ‘sme’ in ‘-march=armv9.2-a+dotprod+fp16+sve+i8mm+sve2+sme’
cc1: note: valid arguments are: fp simd crc lse fp16 rcpc rdma dotprod aes sha2 crypto sha3 sm4 fp16fml sve profile rng memtag sb ssbs predres sve2 sve2-sm4 sve2-aes sve2-sha3 sve2-bitperm tme i8mm f32mm f64mm bf16 flagm pauth ls64 mops cssc; did you mean ‘sm4’?
gmake[6]: *** [_deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_2.dir/build.make:79: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_2.dir/ggml-cpu/ggml-cpu.c.o] Error 1
gmake[5]: *** [CMakeFiles/Makefile2:1370: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_2.dir/all] Error 2
gmake[5]: *** Waiting for unfinished jobs....
[ 11%] Built target ggml-cpu-armv8.2_1
[ 15%] Built target ggml-cpu-armv8.0_1
[ 23%] Built target ggml-cpu-armv8.2_2
[ 30%] Built target ggml-cpu-armv8.6_1
[ 23%] Built target ggml-cpu-armv8.6_2
[ 26%] Built target ggml-cpu-armv8.2_3
[ 30%] Building C object _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/ggml-cpu.c.o
[ 30%] Building CXX object _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/ggml-cpu.cpp.o
[ 30%] Building CXX object _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/repack.cpp.o
[ 30%] Building CXX object _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/hbm.cpp.o
[ 31%] Building CXX object _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/iqp.cpp.o
cc1: error: invalid feature modifier ‘sme’ in ‘-march=armv9.2-a+dotprod+fp16+sve+i8mm+sme’
cc1: note: valid arguments are: fp simd crc lse fp16 rcpc rdma dotprod aes sha2 crypto sha3 sm4 fp16fml sve profile rng memtag sb ssbs predres sve2 sve2-sm4 sve2-aes sve2-sha3 sve2-bitperm tme i8mm f32mm f64mm bf16 flagm pauth ls64 mops cssc; did you mean ‘sm4’?
[ 31%] Building C object _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/quants.c.o
gmake[6]: *** [_deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/build.make:79: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/ggml-cpu.c.o] Error 1
gmake[6]: *** Waiting for unfinished jobs....
cc1plus: error: invalid feature modifier ‘sme’ in ‘-march=armv9.2-a+dotprod+fp16+sve+i8mm+sme’
cc1plus: note: valid arguments are: fp simd crc lse fp16 rcpc rdma dotprod aes sha2 crypto sha3 sm4 fp16fml sve profile rng memtag sb ssbs predres sve2 sve2-sm4 sve2-aes sve2-sha3 sve2-bitperm tme i8mm f32mm f64mm bf16 flagm pauth ls64 mops cssc; did you mean ‘sm4’?
gmake[6]: *** [_deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/build.make:93: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/ggml-cpu.cpp.o] Error 1
[ 31%] Building CXX object _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/traits.cpp.o
cc1plus: error: invalid feature modifier ‘sme’ in ‘-march=armv9.2-a+dotprod+fp16+sve+i8mm+sme’
cc1plus: note: valid arguments are: fp simd crc lse fp16 rcpc rdma dotprod aes sha2 crypto sha3 sm4 fp16fml sve profile rng memtag sb ssbs predres sve2 sve2-sm4 sve2-aes sve2-sha3 sve2-bitperm tme i8mm f32mm f64mm bf16 flagm pauth ls64 mops cssc; did you mean ‘sm4’?
[ 31%] Building CXX object _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/amx/amx.cpp.o
cc1plus: error: invalid feature modifier ‘sme’ in ‘-march=armv9.2-a+dotprod+fp16+sve+i8mm+sme’
cc1plus: note: valid arguments are: fp simd crc lse fp16 rcpc rdma dotprod aes sha2 crypto sha3 sm4 fp16fml sve profile rng memtag sb ssbs predres sve2 sve2-sm4 sve2-aes sve2-sha3 sve2-bitperm tme i8mm f32mm f64mm bf16 flagm pauth ls64 mops cssc; did you mean ‘sm4’?
gmake[6]: *** [_deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/build.make:107: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/repack.cpp.o] Error 1
cc1: error: invalid feature modifier ‘sme’ in ‘-march=armv9.2-a+dotprod+fp16+sve+i8mm+sme’
cc1: note: valid arguments are: fp simd crc lse fp16 rcpc rdma dotprod aes sha2 crypto sha3 sm4 fp16fml sve profile rng memtag sb ssbs predres sve2 sve2-sm4 sve2-aes sve2-sha3 sve2-bitperm tme i8mm f32mm f64mm bf16 flagm pauth ls64 mops cssc; did you mean ‘sm4’?
gmake[6]: *** [_deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/build.make:121: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/iqp.cpp.o] Error 1
cc1plus: error: invalid feature modifier ‘sme’ in ‘-march=armv9.2-a+dotprod+fp16+sve+i8mm+sme’
cc1plus: note: valid arguments are: fp simd crc lse fp16 rcpc rdma dotprod aes sha2 crypto sha3 sm4 fp16fml sve profile rng memtag sb ssbs predres sve2 sve2-sm4 sve2-aes sve2-sha3 sve2-bitperm tme i8mm f32mm f64mm bf16 flagm pauth ls64 mops cssc; did you mean ‘sm4’?
gmake[6]: *** [_deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/build.make:149: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/quants.c.o] Error 1
gmake[6]: *** [_deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/build.make:135: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/hbm.cpp.o] Error 1
cc1plus: error: invalid feature modifier ‘sme’ in ‘-march=armv9.2-a+dotprod+fp16+sve+i8mm+sme’
cc1plus: note: valid arguments are: fp simd crc lse fp16 rcpc rdma dotprod aes sha2 crypto sha3 sm4 fp16fml sve profile rng memtag sb ssbs predres sve2 sve2-sm4 sve2-aes sve2-sha3 sve2-bitperm tme i8mm f32mm f64mm bf16 flagm pauth ls64 mops cssc; did you mean ‘sm4’?
gmake[6]: *** [_deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/build.make:163: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/traits.cpp.o] Error 1
cc1plus: error: invalid feature modifier ‘sme’ in ‘-march=armv9.2-a+dotprod+fp16+sve+i8mm+sme’
cc1plus: note: valid arguments are: fp simd crc lse fp16 rcpc rdma dotprod aes sha2 crypto sha3 sm4 fp16fml sve profile rng memtag sb ssbs predres sve2 sve2-sm4 sve2-aes sve2-sha3 sve2-bitperm tme i8mm f32mm f64mm bf16 flagm pauth ls64 mops cssc; did you mean ‘sm4’?
gmake[6]: *** [_deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/build.make:177: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/ggml-cpu/amx/amx.cpp.o] Error 1
gmake[5]: *** [CMakeFiles/Makefile2:1305: _deps/llama_cpp-build/ggml/src/CMakeFiles/ggml-cpu-armv9.2_1.dir/all] Error 2
gmake[4]: *** [CMakeFiles/Makefile2:2277: _deps/llama_cpp-build/tools/server/CMakeFiles/llama-server.dir/rule] Error 2
gmake[3]: *** [Makefile:703: llama-server] Error 2
gmake[2]: *** [CMakeFiles/ollama-llama-server-local.dir/build.make:95: ollama-llama-server-local-prefix/src/ollama-llama-server-local-stamp/ollama-llama-server-local-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:193: CMakeFiles/ollama-llama-server-local.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
Hi,
With the latest JetPack 7.2.1, ollama can be installed via the command below:
$ curl -fsSL https://ollama.com/install.sh | sh
$ ollama run gemma:2b
$ ollama ps
NAME ID SIZE PROCESSOR CONTEXT UNTIL
gemma:2b b50d6c999e59 1.9 GB 100% GPU 4096 3 minutes from now
Thanks.
Please read my first message.
“WARNING: Unsupported JetPack version detected. GPU may not be supported”
Also I should be able to build it from source
BTW using the sdk manager to flash the image using the usb-c cable doesn’t work either. The board is detected but after finishing the installation wizard it says that there is a “connection problem with the board” due to problematic usb-c cable and I tried different cables. I’ve ended up flashing the board using a auxiliary usb drive and usb-ttl serial
Hi,
It should work with the upstream script directly.
The warning is a harmless message.
Please make sure you are using the latest software that support SBSA driver.
Thanks.
I was able to run ollama models from latest version, yes. My concern is that I was not able to see the GPU being used while the model was loaded, running, working.
I tried tegrastats and nvidia-smi.
How do I test this?
You can use ollama ps while running a model to check if its using GPU or CPU
Hi
We test the ollama’s latest status again.
On JetPack 7.2.1, setup ollama with the below command:
$ curl -fsSL https://ollama.com/install.sh | sh
>>> Installing ollama to /usr/local
>>> Downloading ollama-linux-arm64.tar.zst
######################################################################## 100.0%
WARNING: Unsupported JetPack version detected. GPU may not be supported
>>> Creating ollama user...
>>> Adding ollama user to render group...
>>> Adding ollama user to video group...
>>> Adding current user to ollama group...
>>> Creating ollama systemd service...
>>> Enabling and starting ollama service...
Created symlink /etc/systemd/system/default.target.wants/ollama.service → /etc/systemd/system/ollama.service.
>>> NVIDIA JetPack ready.
>>> The Ollama API is now available at 127.0.0.1:11434.
>>> Install complete. Run "ollama" from the command line.
(The warning is a harmless message.)
Then test with gemma:2b:
$ ollama run gemma:2b
It can run with 100% GPU without issue.
$ ollama ps
NAME ID SIZE PROCESSOR CONTEXT UNTIL
gemma:2b b50d6c999e59 1.9 GB 100% GPU 4096 3 minutes from now
Thanks.
zigor@localhost:~$ ollama run gemma4:26b
pulling manifest
pulling dfd98d273421: 100% ▕██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ ▏ 16 GB/ 16 GB 49 MB/s 0s
pulling 41926ed5f140: 99% ▕██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ ▏ 1.2 GB/1.2 GB 116 MB/s 0s
pulling 6326fb9f5e48: 100% ▕██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ ▏ 460 MB/461 MB 106 MB/s 0s
verifying sha256 digest
writing manifest
success
Error: 500 Internal Server Error: llama-server startup failed after projector CPU offload retry: llama-server process has terminated: exit status 1: llama_init_from_model: failed to initialize the context: Gemma4Assistant requires ctx_other to be set (this warning is normal during memory fitting)
cudaMalloc failed: out of memory
alloc_tensor_range: failed to allocate CUDA0 buffer of size 251658240
llama_init_from_model: failed to initialize the context: failed to allocate buffer for kv cache
zigor@localhost:~$
zigor@localhost:~$ free -h
total used free shared buff/cache available
Mem: 7.3Gi 1.6Gi 5.7Gi 92Ki 229Mi 5.7Gi
Swap: 23Gi 377Mi 23Gi
Is it possible to load more data in the ram?
btw how much the GPU can handle in this system? I’m not able to find this
AastaLLL:
ollama
zigor@localhost:~$ ollama run gemma4:12b
pulling manifest
pulling 1278394b6936: 100% ▕██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ ▏ 7.4 GB/7.4 GB 76 MB/s 0s
pulling 675ad6e68101: 97% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ ▏ 169 MB/175 MB 99 MB/s 0s
verifying sha256 digest
writing manifest
success
Error: 500 Internal Server Error: llama-server startup failed after projector CPU offload retry: llama-server process has terminated: exit status 1: cudaMalloc failed: out of memory
alloc_tensor_range: failed to allocate CUDA0 buffer of size 226492416
llama_init_from_model: failed to initialize the context: failed to allocate buffer for kv cache
So what’s your point? Obviously, the 26b and 12b Gemma4 models don’t fit in the Ram of your Orin nano. Look at Ollama.com : the Gemma4 12b is already 7.6 GB. Try it with smaller models like AastaLLL did. My experience: up to 8b models in Q4KM run okay.
ciroreed:
Swap: 23Gi 377Mi 23Gi
But I thought swap space allowed bigger models. nvm thx
Hi,
GPU requires physical memory, so swap won’t help.
Could you try the comment mentioned above to verify if ollama can work correctly on your environment first?
Thanks.
Yes, my ollama instance reports 100% GPU with ollama ps
Hi,
Just want to double-check that your issue is solved since ollama use 100% GPU now?
Thanks,
uhh 26 > 5 so it cant load