Skip to content

Compile bug: Unsupported gpu architecture 'compute_sm_120' #20195

Description

@Ezzz-dev

Git commit

c5a7788

Operating systems

Windows

GGML backends

CUDA

Problem description & steps to reproduce

Trying to compile llama.cpp for my RTX 5060ti

Latest CUDA ToolKit installed: 13.1
NVIDIA drivers latest, nvidia-smi reports CUDA 13.1 support

llama.cpp reports:
nvcc fatal : Unsupported gpu architecture 'compute_sm_120'

First Bad Commit

No response

Compile command

cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="sm_120"
cmake --build build --config Release

Relevant log output

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 13.1.targets
(803,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\bin\nvcc.exe"  --use-loc
al-env -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64" -x cu
   -I"C:\Users\soyal\Desktop\llama.cpp\ggml\src\ggml-cuda\.." -IC:\Users\soyal\Desktop\llama.cpp\ggml\src\..\include -I
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUD
A\v13.1\include\cccl" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\include"     --keep-dir ggml-cuda\x64
\Release -use_fast_math -maxrregcount=0    --machine 64 --compile -cudart static -std=c++17 --generate-code=arch=comput
e_sm_120,code=[compute_sm_120,sm_sm_120] -extended-lambda -compress-mode=size -Xcompiler="/EHsc -Ob2 /Zc:preprocessor"
  -D_WINDOWS -DNDEBUG -DGGML_BACKEND_BUILD -DGGML_BACKEND_SHARED -D_CRT_SECURE_NO_WARNINGS -DGGML_SCHED_MAX_COPIES=4 -D
_XOPEN_SOURCE=600 -DGGML_CUDA_PEER_MAX_BATCH_SIZE=128 -DGGML_CUDA_USE_GRAPHS -DGGML_SHARED -D"CMAKE_INTDIR=\"Release\""
 -Dggml_cuda_EXPORTS -D_WINDLL -D_MBCS -D"CMAKE_INTDIR=\"Release\"" -Dggml_cuda_EXPORTS -Xcompiler "/EHsc /W1 /nologo /
O2 /FS   /MD " -Xcompiler "/Fdggml-cuda.dir\Release\vc143.pdb" -o ggml-cuda.dir\Release\fattn-vec-instance-f16-f16.obj
"C:\Users\soyal\Desktop\llama.cpp\ggml\src\ggml-cuda\template-instances\fattn-vec-instance-f16-f16.cu"" exited with cod
e 1. [C:\Users\soyal\Desktop\llama.cpp\build\ggml\src\ggml-cuda\ggml-cuda.vcxproj]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions