Skip to content

[Windows] RTX 5070 Ti (Blackwell sm_120) - CUDA compilation and runtime workarounds #22696

Closed as not planned

Description

@loongmiaow-pixel

Environment

  • GPU: NVIDIA GeForce RTX 5070 Ti Laptop GPU (Blackwell, compute capability 12.0)
  • Driver: 595.79
  • OS: Windows 11
  • Python: 3.14
  • CMake: 3.31
  • MSVC: Visual Studio 2022 Build Tools 14.44

Problem

Building and running llama.cpp on RTX 5070 Ti requires several workarounds:

  1. sm_120 not in default CUDA arch list - CMAKE_CUDA_ARCHITECTURES needs explicit 120
  2. CUDA Toolkit DLL conflict - If CUDA Toolkit 12.x is installed, cudart64_12.dll conflicts with CUDA 13.x runtime used by newer drivers
  3. CUDA_VISIBLE_DEVICES=-1 - System-level env var set by NVIDIA tools blocks GPU detection
  4. Windows GPU Preference - Hybrid graphics laptops (Intel UHD + RTX 5070 Ti) route Python/CLI to integrated GPU by default

Solution

Build:

cmake -B build -G "Visual Studio 17 2022" -DCMAKE_CUDA_ARCHITECTURES=120 -DLLAMA_CUDA=ON
cmake --build build --config Release

Runtime:

$env:CUDA_VISIBLE_DEVICES = "0"
$env:CUDA_MODULE_LOADING = "LAZY"

For hybrid graphics laptops, set Windows GPU Preference in registry:

$key = "HKCU:\Software\Microsoft\DirectX\UserGpuPreferences"
Set-ItemProperty -Path $key -Name "C:\path\to\llama-cli.exe" -Value "GpuPreference=2;"

Verification

ggml_cuda_init: found 1 CUDA devices
Device 0: NVIDIA GeForce RTX 5070 Ti Laptop GPU, compute capability 12.0, VMM: yes

Question

Is there a plan to add sm_120 (Blackwell) to the default CUDA architectures? RTX 5070/5080/5090 laptops are shipping now.

Happy to contribute a PR to the CMake/CUDA build docs if helpful.

Activity

  1. am17an commented on May 5, 2026

    @am17an
    Contributor

    There's probably some issue in your particular setup, compilation on sm_120 works fine

  2. maczzinatui commented on Jun 2, 2026

    @maczzinatui
  3. github-actions commented on Jul 19, 2026

    @github-actions
    Contributor

    This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions