-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Problem Description
The precompiled k-wave CUDA binaries (v1.3.1) don't support newer NVIDIA GPUs with compute capability 12.0 (sm_120), such as the RTX 5070 Ti. When attempting to run GPU simulations, the binary either fails to detect the GPU or crashes with:
nvcc fatal: Unsupported gpu architecture 'compute_120'
Affected GPUs
RTX 5070 Ti
RTX 5080
RTX 5090
Any other Blackwell architecture GPUs (sm_120)
Root Cause
The precompiled binaries were compiled with CUDA 12.5 or earlier, which doesn't support sm_120 architecture. CUDA 13.0+ is required for Blackwell GPU support.
To Reproduce
Steps to reproduce the behavior:
Install k-wave-python on a system with an RTX 5070 Ti (or other Blackwell GPU with compute capability 12.0)
Install k-wave-python: pip install k-wave-python
Create a simple GPU simulation script:
pythonfrom kwave.kgrid import kWaveGrid
from kwave.kmedium import kWaveMedium
from kwave.ksource import kSource
from kwave.ksensor import kSensor
from kwave.kspaceFirstOrder3D import kspaceFirstOrder3DG
import numpy as np
# Create a small 3D grid
kgrid = kWaveGrid([64, 64, 64], [1e-3, 1e-3, 1e-3])
medium = kWaveMedium(sound_speed=1500)
source = kSource()
source.p0 = np.zeros((64, 64, 64))
source.p0[32, 32, 32] = 1
sensor = kSensor()
sensor.mask = np.zeros((64, 64, 64), dtype=bool)
sensor.mask[32, :, 32] = True
# Attempt GPU simulation
sensor_data = kspaceFirstOrder3DG(kgrid, medium, source, sensor)
- Run the script:
python simulation.py - See error:
- Binary fails to detect GPU, or
- Segmentation fault (SIGSEGV), or
subprocess.CalledProcessError: Command '[...kspaceFirstOrder-CUDA...] died with <Signals.SIGSEGV: 11>
Expected behavior
The GPU simulation should run successfully on the RTX 5070 Ti, utilizing its compute capability 12.0 (sm_120) architecture. The binary should detect the GPU and complete the simulation without errors.
Screenshots
Error output:
subprocess.CalledProcessError: Command '['/path/to/.venv/lib/python3.12/site-packages/kwave/bin/linux/kspaceFirstOrder-CUDA', '-i', '/tmp/input.h5', '-o', '/tmp/output.h5', '-t', '16', '--verbose', '2', '--p_raw', '-s', '1488']' died with <Signals.SIGSEGV: 11>.
Testing the binary directly:
bash$ ./kspaceFirstOrder-CUDA --version
Segmentation fault
GPU info showing RTX 5070 Ti with compute capability 12.0:
bash$ nvidia-smi
Desktop (please complete the following information):
- OS: Linux
- Version 22.04