diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-03 14:05:38 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-03 14:05:38 -0400 |
| commit | 32b551d43781dc7b8ac4587ca2ba1554b0cbd5e5 (patch) | |
| tree | d1cab6bcc35e461610cd5dfcf3f51ba679a576fc /tools/cuda-bridge/Makefile | |
| parent | fa71f1b53b524e5f6c6c1fbff1088d610b9f3236 (diff) | |
| download | open-iov-32b551d43781dc7b8ac4587ca2ba1554b0cbd5e5.tar.gz open-iov-32b551d43781dc7b8ac4587ca2ba1554b0cbd5e5.zip | |
vgsp: host CUDA bridge + sema release recovery; greeneye simulator wave
- kernel: gsp_cuda_bridge (QMD launch capture, debugfs job/out/done, param+output resolution cached from inline writes), sema drain fixes (never hold/starve a channel), GR ring autopin + counter autoreg, per-page push reads, counter-derive gate; module builds clean
- tools/cuda-bridge: CUDA driver-API daemon executing mail/vadd kernels on the physical GPU, CUBB2/CBD2 v2 protocol, layout check + self-tests
- tools/guest-diag + tools/cuda-ab: scanner/pin fixes, victory push-only mode
- debug/risc-v-gsp-rm-vm: Phase S simulator wave (GSP device model, boot ladder, triage/re-demo harnesses, docs 30-41), GPGPU-sim scaffolding
- STATE-CURRENT/docs updates
Diffstat (limited to 'tools/cuda-bridge/Makefile')
| -rw-r--r-- | tools/cuda-bridge/Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tools/cuda-bridge/Makefile b/tools/cuda-bridge/Makefile new file mode 100644 index 0000000..d75a7c5 --- /dev/null +++ b/tools/cuda-bridge/Makefile @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Build the host-side CUDA bridge daemon. +# +# Kernels are written in CUDA C, compiled to PTX at build time by nvcc, and +# embedded into the binary by embed_ptx.py, so cuda_bridge needs only the +# driver's libcuda at runtime. kernels_ptx.h is a generated file; if it is +# already present the build works without nvcc. + +CC ?= cc +NVCC ?= nvcc +PTX_ARCH ?= sm_75 +CFLAGS ?= -O2 -Wall -Wextra -std=gnu11 +LDLIBS ?= -lcuda + +all: cuda_bridge + +kernels.ptx: kernels.cu + $(NVCC) -arch=$(PTX_ARCH) -ptx $< -o $@ + +kernels_ptx.h: kernels.ptx embed_ptx.py + python3 embed_ptx.py kernels.ptx kernels_ptx.h + +cuda_bridge: cuda_bridge.c kernels_ptx.h + $(CC) $(CFLAGS) cuda_bridge.c -o $@ $(LDLIBS) + +test: cuda_bridge + ./cuda_bridge --test + +bridge-test: cuda_bridge + python3 bridge_selftest.py + +layout-check: + python3 check_module_layout.py + +mutate-test: cuda_bridge + ./cuda_bridge --mutation-test + +bench: cuda_bridge + ./cuda_bridge --bench + +clean: + rm -f cuda_bridge kernels.ptx kernels_ptx.h + +.PHONY: all test bridge-test layout-check mutate-test bench clean |
