Feat: add initial HIP PSF backend

This commit is contained in:
wyj committed 2026-09-05 04:23:57 -04:00
1 parent e48c490337
commit 7a80086f63
10 files changed
+512 -30

No files matched your search

+20
View File
@@ -23,6 +23,26 @@ equator to the northern hemisphere, so boundary stars have a deterministic
color.
The default output is PNG at `output/imgs/minkowski_sky.png`.
### Optional HIP PSF backend
The default `PSF_BACKEND=cpu` uses the established OpenMP/private-HDR path.
Build the direct-atomic HIP PSF backend explicitly with
`PSF_BACKEND=hip`; it requires HIP/ROCm and a usable GPU agent, and writes a
separate `_hip` binary so it cannot overwrite the CPU renderer:
```sh
make PSF_BACKEND=hip SPACETIME=minkowski backend
./build/Release/minkowski_sky_hip --catalog assets/sky_grid_5deg.csv \
--output output/imgs/minkowski_sky_hip.png
```
The HIP backend accelerates only cache-eligible PSF events. Existing direct
fallbacks remain CPU reference evaluations, with an ordered HDR transfer before
and after each fallback. A HIP initialization, upload, kernel, or download
error terminates the render; it never switches to the CPU backend silently.
Use `make PSF_BACKEND=hip SPACETIME=minkowski hip-psf-test` for the small
GPU-vs-CPU cache-HDR regression.
## Movie PNG sequence (Phase A)
Movie mode consumes a canonical observer-track CSV rather than a fixed camera.