프로토타입 · 미리 보기: 공식 레지스트리의 모든 서버를 담고 있으며 30분마다 동기화해요. 리뷰와 계정 기능은 다음 단계에서 열려요.
PopNx MCPAI를 쓰는 사람을 위한 MCP 서버 · 쉬운 말로 설명해요

cuda4cpu

제작자: javier-cabezas버전 0.5.0i★ –i내 컴퓨터에서 실행
레지스트리 이름io.github.javier-cabezas/cuda4cpu

설치

개요

제작자가 쓴 설명(영어 원문)

Compile, run and check CUDA and HIP kernels without a GPU: wrong results, races, memory errors

PopNx MCP의 세 기둥

이 세 가지는 절대 하나의 점수로 합치지 않아요. 의견, 측정, 인기는 서로 다른 것이니까요.

할 수 있는 일

이 서버는 아직 쉬운 말로 된 요약을 쓰지 못했어요. 아래는 레지스트리에서 읽어 온 사실이에요.

  • 연결 방식: 내 컴퓨터에서 실행
  • 전송 방식: stdio
  • 카테고리: 검색 및 AI 기억

설치

쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.

설치하기 전에

  • 기본 점검: 1개 중 1개 통과
  • 내 컴퓨터에서 내 사용자 계정의 권한(파일, 네트워크, 앱)으로 실행돼요.
  • 레지스트리에 입력해야 할 키가 나와 있지 않아요.

필요한 것

어떤 앱을 쓰세요?

위에서 앱을 고르세요. 기억해 두었다가 다음부터는 버튼에 “…에 설치”라고 표시해요.

Claude Desktop → Settings → Developer → Edit Config를 열고 claude_desktop_config.json에 이 내용을 붙여 넣으세요

{
  "mcpServers": {
    "cuda4cpu": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/javier-cabezas/cuda4cpu:0.5.0"
      ]
    }
  }
}

터미널에서 이 명령어를 실행하세요

claude mcp add cuda4cpu -- docker run -i --rm ghcr.io/javier-cabezas/cuda4cpu:0.5.0

Cursor에서 열기

또는 설정을 직접 복사하기

프로젝트의 .cursor/mcp.json 또는 ~/.cursor/mcp.json에 붙여 넣으세요

{
  "mcpServers": {
    "cuda4cpu": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/javier-cabezas/cuda4cpu:0.5.0"
      ]
    }
  }
}

브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.

VS Code에서 열기

또는 설정을 직접 복사하기

프로젝트의 .vscode/mcp.json에 붙여 넣으세요

{
  "servers": {
    "cuda4cpu": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/javier-cabezas/cuda4cpu:0.5.0"
      ]
    }
  }
}

브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.

이 서버는 내 컴퓨터에서 실행되는데, ChatGPT는 인터넷에 있는 서버에만 연결할 수 있어요. 다른 앱을 고르세요.

선택한 앱은 이 기기의 쿠키에만 저장돼요. 계정은 필요 없어요.

이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.

할 수 있는 일

내 컴퓨터에서 실행돼요. 설치하면 AI 앱에 도구 목록이 나타나요.

기본 점검i

누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 6일 점검

  • ✓ 통과

    제작자와 저장소 일치

    레지스트리 이름이 GitHub 계정 javier-cabezas 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요

  • … 아직 점검 안 함

    계속 관리되고 있음

    아직 GitHub에서 이 저장소를 읽어 오지 않았어요

  • … 아직 점검 안 함

    라이선스 있음

    아직 GitHub에서 이 저장소를 읽어 오지 않았어요

  • – 해당 없음

    엔드포인트 응답

    내 컴퓨터에서 실행되는 서버라 인터넷 엔드포인트가 없어요

  • – 해당 없음

    OAuth로 로그인

    내 컴퓨터에서 실행되며, 대신 로컬 설정을 사용해요

  • … 아직 점검 안 함

    도구 설명에 숨겨진 지시 없음

    내 컴퓨터에서 실행돼요. 도구 목록은 인터넷 엔드포인트가 있는 서버에서만 읽을 수 있어요

검색 및 AI 기억 카테고리의 다른 서버와 비교i

  • 이 카테고리의 다른 서버 7247개 중 0%보다 스타가 많아요
  • 이 카테고리의 다른 서버 7247개 중 93%보다 최근에 레지스트리에 공개됐어요
  • 기본 점검 결과가 이 카테고리의 다른 서버 7247개 중 100%와 같거나 더 좋아요

레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.

자주 묻는 질문

cuda4cpu, 안전한가요?

해당하는 기본 점검 1개 중 1개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.

어떤 키나 코드가 필요한가요?

레지스트리에 필수 키가 나와 있지 않아요. 다만 처음 쓸 때 로그인을 요구하는 서버도 있어요.

내 컴퓨터에서 실행되나요, 클라우드에서 실행되나요?

내 컴퓨터에서 실행돼요. AI 앱이 필요할 때 실행하고, 데이터는 제작자의 서버를 거치지 않아요(서버 자체가 온라인 서비스를 호출하는 경우는 제외).

아직 관리되고 있나요?

GitHub 저장소는 마지막으로 – 변경됐고, 최신 버전(0.5.0)은 3일 전 레지스트리에 올라왔어요.

어떤 앱에서 쓸 수 있나요?

Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. 내 컴퓨터에 Docker도 있어야 해요.

대신 쓸 수 있는 건 뭐가 있나요?

같은 카테고리에는: Context7, Codebase Memory, Exa

대안

같은 카테고리에서 다른 제작자가 만든 서버예요. 스타 순으로 정렬했어요.

카드 보는 법:★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i

Context7

제작자: upstash

Up-to-date docs for AI agents

컴퓨터 또는 클라우드★ 64,224MIT오늘 업데이트
설치

Codebase Memory

제작자: DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

내 컴퓨터에서 실행★ 48,148MIT20일 전 업데이트
설치

Exa

제작자: exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

클라우드에서 실행★ 5,213MIT지난달 업데이트
설치

제작자의 README

README 열기

제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.

Run CUDA and HIP programs on your CPU, unmodified, with your regular C++ compiler. No GPU, no nvcc, no CUDA toolkit: GCC or Clang compile your .cu files, and the kernels run as native code on every core.

$ cuda4cpu-c++ -O2 vecadd.cu -o vecadd

$ ./vecadd c[42] = 126, computed on cuda4cpu: AMD Ryzen 7 8845HS w/ Radeon 780M Graphics

  • Test CUDA code where there's no GPU: in CI on GitHub's hosted runners, on a laptop, or in a classroom.
  • Let AI agents test the kernels they write: cuda4cpu-mcp, an MCP server for Claude Code, Cursor or any MCP client, compiles, runs and checks CUDA and HIP code, and reports wrong results, missing barriers and memory errors at their source lines.
  • Debug kernels with the tools you already use: gdb stops in a single CUDA thread, and AddressSanitizer, UBSan and Valgrind point at the kernel's source line. A kernel that crashes is reported with its CUDA thread and block.
  • Catch the bugs a GPU hides: missing __syncthreads(), threads of a block that reach different barriers, reads of memory never written, and allocations never freed.
  • Real code works: 132 of 159 programs from NVIDIA's cuda-samples, Rodinia and AMD's rocm-examples build unmodified and pass, and CI checks that they keep passing.
  • The CUDA you write today: shared memory, warp shuffles and votes, cooperative groups (including grid.sync()), atomics, half precision, bfloat16 and 8-bit floats, streams, events, and CUDA graphs with stream capture. HIP code compiles too.

Contents

  • Quick start
  • See it catch bugs
  • Use it from an AI agent (MCP)
  • Use it in your project
  • What's supported
  • How it works
  • How it compares
  • FAQ
  • Roadmap and contributing

Quick start

You need Linux (or WSL 2) on x86-64, with GCC 14 or later and Python 3, as on Ubuntu 24.04 (sudo apt-get install g++-14 python3). Install the latest release in ~/.local:

mkdir -p ~/.local

curl -fsSL https://github.com/javier-cabezas/cuda4cpu/releases/latest/download/cuda4cpu-linux-x86_64.tar.gz | tar -xz -C ~/.local --strip-components=1

Then compile any .cu file with cuda4cpu-c++, which takes the same options as your C++ compiler, or with cuda4cpu-nvcc, which takes nvcc's:

cuda4cpu-c++ -O2 vecadd.cu -o vecadd

./vecadd

With Docker, there's nothing else to install: the image has cuda4cpu, GCC and CMake.

docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/src" -w /src ghcr.io/javier-cabezas/cuda4cpu \

cuda4cpu-nvcc -O2 vecadd.cu -o vecadd

From source, which needs CMake 3.25+ and Ninja too, and builds and runs the tests:

git clone https://github.com/javier-cabezas/cuda4cpu.git

cd cuda4cpu cmake --workflow --preset release cmake --install build/release --prefix /usr/local

See docs/usage.md for the other ways to install it and the build options.

See it catch bugs

A missing `__syncthreads()`. On a GPU, this kernel can pass its tests for a long time: only the first thread of each warp reads what another warp wrote. cuda4cpu runs the threads of a block in index order between barriers, which hides the bug too. Run them in reverse or in random order, and it shows (examples/bugs/missing_barrier.cu):

__global__ void pair_sum(const int *in, int *out)

{ shared int tile[256]; int t = threadIdx.x; int i = blockIdx.x * blockDim.x + t; tile[t] = in[i]; // Bug: a __syncthreads() is missing here out[i] = tile[t] + (t > 0 ? tile[t - 1] : 0); }

$ ./missing_barrier

PASSED: 0 wrong results $ CUDA4CPU_SCHEDULE=reverse ./missing_barrier FAILED: 65279 wrong results $ CUDA4CPU_SCHEDULE=random ./missing_barrier cuda4cpu: running threads in random order, seed 1277581447 (CUDA4CPU_SCHEDULE=random:1277581447 reproduces it) FAILED: 32593 wrong results

An out-of-bounds access, reported by AddressSanitizer with the kernel's line (examples/bugs/out_of_bounds.cu):

$ cuda4cpu-c++ -g -fsanitize=address out_of_bounds.cu -o out_of_bounds

$ ./out_of_bounds ==8457==ERROR: AddressSanitizer: use-after-poison on address 0x7c81561e2630 ... READ of size 4 at 0x7c81561e2630 thread T4 #0 0x65457dfe1ad5 in scale(float*, int) .../out_of_bounds.cu:27 ... 0x7c81561e2630 is located 4400 bytes inside of 4608-byte region [0x7c81561e1500,0x7c81561e2700) ... cuda4cpu: error: CUDA thread (76, 0, 0) of block (4, 0, 0) made the error that the sanitizer reports above, in the kernel launched at out_of_bounds.cu:37.

The array has 1100 floats, 4400 bytes: cuda4cpu rounds allocations up to 256 bytes and poisons the rest, so the first element past the end is reported, as use-after-poison. Without the sanitizer, the crash is reported with its CUDA thread and block too.

Divergent barriers. CUDA requires every thread of a block to reach the same __syncthreads(), and cuda4cpu reports blocks whose threads don't:

cuda4cpu: warning: threads of block (0, 0, 0) reached different __syncthreads() calls,

at kernel.cu:12 and kernel.cu:15. CUDA requires every thread of a block to reach the same one.

gdb in a CUDA thread. Each CUDA thread is a fiber with its own stack, so breakpoints, stepping and backtraces work as in any program. cuda4cpu's gdb script adds the built-in variables:

(gdb) break kernel.cu:42 if $threadIdx("x") == 6 && $blockIdx("x") == 2

(gdb) run (gdb) cuda4cpu thread (6, 0, 0) of block (2, 0, 0), lane 6; blocks of (64, 1, 1) threads, grid of (8, 1, 1) blocks

docs/debugging.md has the details.

Use it from an AI agent (MCP)

A coding agent on a machine without a GPU can write CUDA, but it can't run it, so it can't tell whether a kernel works. cuda4cpu-mcp gives it a way to find out: an MCP server that compiles, runs and tests CUDA and HIP code with cuda4cpu, and runs the checks above for it. Register it with your agent, for example Claude Code:

claude mcp add cuda4cpu -- cuda4cpu-mcp    # installed from a release, or build/release/tools/cuda4cpu-mcp

claude mcp add cuda4cpu -- docker run -i --rm -v "$PWD:$PWD" ghcr.io/javier-cabezas/cuda4cpu

Other clients take the same command, for example in Cursor's mcp.json or Claude Desktop's configuration: {"mcpServers": {"cuda4cpu": {"command": "cuda4cpu-mcp"}}}. The server speaks MCP over stdio, and is listed in the MCP Registry as io.github.javier-cabezas/cuda4cpu. In Docker, it sees only the directories you mount (-v "$PWD:$PWD" above): sources given inline need none.

ToolWhat the agent gets
compilenvcc's or hipcc's diagnostics at the source's lines, and the features it uses that cuda4cpu doesn't implement
runthe exit code, the output, and cuda4cpu's warnings
checka verdict, and findings with their source lines: memory errors and undefined behavior (AddressSanitizer and UBSan), results that change with the order of a block's threads (a missing __syncthreads() or __syncwarp(), a race), divergent barriers, copies in the wrong direction, hangs
test_kernela test of one kernel, without writing a program: the agent gives the launch configuration and the arguments (given or generated), with expected values or a C++ reference function, and gets the elements that differ and the findings of check
capabilitieswhat cuda4cpu implements and doesn't, so that the agent can tell a bug in its code from a missing feature

Results are JSON, with a summary first. For the missing __syncthreads() above, whose program passes in the default order, check answers:

problems found

[depends on the thread order] running the threads of each block in reverse order (reverse) ends with exit code 1 instead of exit code 0; 8 of 8 other orders change the result a thread reads data that another thread of its block writes without a syncthreads() between them (or, within a warp, a syncwarp()), or threads race on the same data.

And for a SAXPY that computes its index with blockDim.y instead of blockDim.x, test_kernel with a reference that loops over the elements answers:

failed

argument 3: 998 of 1000 elements differ (largest error 1998) [1] 5, expected 3 [2] 13, expected 5 ...

A clean check means that nothing showed up in the orders and checks it ran, not that a program has no race. Programs run with your permissions, each in a temporary directory and its own process group, killed at a time-out: the server doesn't sandbox them. docs/debugging.md describes every tool and its arguments.

Use it in your project

CMake. Fetch cuda4cpu and add your .cu files to a target (examples/cmake-project):

include(FetchContent)

FetchContent_Declare(cuda4cpu GIT_REPOSITORY https://github.com/javier-cabezas/cuda4cpu.git GIT_TAG v0.5.0) FetchContent_MakeAvailable(cuda4cpu)

add_executable(my_app main.cpp) cuda4cpu_add_cuda_sources(my_app kernels.cu solver.cu)

With cuda4cpu installed, find_package(cuda4cpu REQUIRED) does the same. HIP sources go through cuda4cpu_add_hip_sources.

Any build system. cuda4cpu-c++ is a compiler driver: use it like your C++ compiler, with .cu files among the inputs. cuda4cpu-hipcc does the same for HIP projects, and drops hipcc's options for AMD GPUs, so build scripts written for hipcc work unchanged:

cuda4cpu-c++ -O2 -o my_app main.cpp kernels.cu

cuda4cpu-hipcc -O2 --offload-arch=gfx90a -o my_app main.cpp kernels.cpp

GitHub Actions. Hosted runners have no GPU, but they can run your CUDA tests with cuda4cpu. The action installs a release, with the drivers on the PATH and the CMake package where find_package(cuda4cpu) finds it:

jobs:

test: runs-on: ubuntu-24.04 env: CXX: g++-14 steps:

  • uses: actions/checkout@v4
  • uses: javier-cabezas/cuda4cpu@v0.5.0
  • run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
  • run: cmake --build build
  • run: ctest --test-dir build --output-on-failure

Again with the threads of each block in another order, which exposes

missing __syncthreads()

  • run: CUDA4CPU_SCHEDULE=reverse ctest --test-dir build --output-on-failure

Its outputs give the toolkit directory, for Makefiles written for nvcc (make CUDA_PATH=...), and the toolchain-file for CMake's CUDA and HIP languages. A project that fetches cuda4cpu with FetchContent needs no action.

What's supported

  • Kernel language: __global__, __device__, __shared__ (static and dynamic), __constant__, __syncthreads(), every warp shuffle, vote and match, __activemask() and __syncwarp(), atomics, cuda_fp16.h, cuda_bf16.h, cuda_fp8.h, cuComplex.h, math and integer intrinsics, rounding-mode intrinsics, clock64().
  • Cooperative groups: thread blocks, tiles of up to 1024 threads,

앞부분만 보여 드려요. 나머지는 저장소에서 읽어 보세요

PopNx에게 묻기