Repository navigation
Releases
Notebook assets for the cuPhoton User Guide
This collection holds the GPU reference notebooks, execution records and rendered chapters used by the cuPhoton User Guide. The guide identifies each scientific run by its cuPhoton source revision. Each asset name contains the SHA-256 digest of its contents.
cuPhoton 0.2
Read the new cuPhoton User Guide Β· Install Β· Make your first difference image
cuPhoton 0.2 introduces three new components: xImage for scene reconstruction, xBeam for time-series and radio-interferometry correlation, and xLens for monitoring and model investigation. Native xFit fits 1,011 candidates 9.8Γ faster, and the 64-image-pair workflow runs 47Γ faster on one GB200. On DGX Spark, xRay's structured solver cut runtime from 4 hours 38 minutes to 5 minutes 56 seconds (47Γ faster). On a 10 TB synthetic radio benchmark, xBeam runs 26Γ faster on four GB200 GPUs than DiFX on two Grace CPUs, and completes the workload in 69 seconds on 64 GB200 GPUs.
cuPhoton 0.2 brings together 352 original commits across 100 pull requests, plus three release-branch maintenance commits. Since v0.1.3, 601 files changed: 412 added and 189 modified, with 179,245 net lines added (182,890 added; 3,645 removed).
Contents π
- Highlights
- Performance
- Install
- Upgrading from 0.1.3
- What changed
- Known limitations and errata
- Contributors
Highlights π
- Prebuilt wheels on PyPI. Install cuPhoton with pip on Linux, with native xDR, xFit, imaging and structured xRay extensions included. See the installation options.
- New components. xImage reconstructs scenes from registered exposures; xBeam correlates time series and radio recordings; xLens provides live dashboards and optional model investigation.
- Native imaging and fitting. Compiled CUDA paths cover Gaussian xFit, source selection, reprojection, constant-kernel matching and FITS postprocessing. #86, #162
- Faster FITS reads. xDR uses nvCOMP for Gzip tiles and selects hardware decompression on supported GPUs. #76, #77
- A transient chain with error bars. The example now carries FITS data through subtraction, fitting and scoring to a candidate catalog, with quality flags, PSF photometry and an experimental combined error budget. #120, #140, #143
- New solver choices. xRay adds structured CPU and GPU fitting; xPois gains an experimental spatial Gaussian-polynomial model; xFit makes its earlier numerical policy available for comparisons. #147, #167, #168
- New documentation. The cuPhoton User Guide covers installation, difference imaging, uncertainty estimates, xRay, xBeam and multi-GPU workflows with worked examples.
Performance π
xFit: 47Γ faster for a 64-pair workflow
On one GB200, reading, subtracting, fitting and scoring 64 image pairs fell from 257.37 s to 5.52 s with native CUDA and eight workers sharing the GPU through CUDA MPS. With one worker, the same v0.2 path took 33.31 s, a 7.7Γ improvement. The fitting call alone, covering 1,011 candidates, fell from 11.83 s to 1.20 s, or 9.8Γ.
The chart compares the v0.1.3 solver policy in both versions. With the default v0.2 policy, fitting alone is 9.3Γ faster and the eight-worker workflow is 41Γ faster. Native CUDA, solver selection, GPU sharing.
xRay: from hours to minutes
On DGX Spark, the opt-in structured solver processes 66,040 detector fits of 798 samples each in 5 minutes 56 seconds, down from 4 hours 38 minutes: 47Γ faster.
xBeam: 10 TB in 69 seconds
xBeam processes a 10 TB synthetic radio correlation benchmark in 7 minutes 24 seconds on four GB200 GPUs with GPUDirect Storage, versus 3 hours 15 minutes for DiFX on two Grace CPUs: 26Γ faster on one node. Across 64 GB200 GPUs, the same workload completes in 69 seconds.
Other measured improvements
- Native imaging. On an RTX PRO 6000 Blackwell, source selection fell from 304.01 ms to 139.63 ms (2.18Γ) and constant-kernel solving from 11.02 ms to 5.48 ms (2.01Γ). #162
- GPU-resident xPois preparation. A 4096Γ4096 FITS workflow on GB300 fell from 91.58 s to 55.95 s, with a 1.63Γ median paired speedup. #156
- Small FP64 xFit batches. Two GB10 benchmarks improved 1.58β1.70Γ, processing 1,011 fits in about 21 seconds instead of 33β36 seconds. #142, #148
- Gzip tiles through nvCOMP. Complete reads of two FITS files with
decompression_backend="auto"ran 1.80β1.82Γ faster on B200, 1.66β1.71Γ on B300, and 1.55β1.56Γ on GB300 than with nvCOMP's CUDA kernels. #77 - Bounded xImage preprocessing. Processing a 256Γ256 region from eight 2048Γ2048 exposures fell from 46.75 ms to 8.47 ms (5.52Γ) on an RTX PRO 6000 Blackwell, while peak Torch device memory fell from 1,632 MiB to 43 MiB. #130
- GPU xImage metrics. Comparing two 2048Γ2048 images took 68.27 ms on an RTX PRO 6000 Blackwell versus 851.66 ms with the single-thread NumPy/SciPy reference: 12.5Γ faster, including GPU transfers. #131
- xPois kernel-fit covariance. Fast FFT lengths cut variance evaluation at 2,000 positions from 0.34 s to 0.01 s (34Γ) for a 4096Γ4096 frame with 11 coefficients on a workstation GPU. Peak CuPy pool allocation falls from 33 GiB to 6.0 GiB, plus 2.4 GiB for FFT plans. #119
- xRay structured roots. In a separate workstation benchmark, the structured GPU backend processed 66,040 fits in 379.43 s, versus 622.55 s for structured CPU fitting: 1.64Γ faster. #147
Install π
Install the 0.2 release using prebuilt Linux wheels from PyPI. Choose the extras for your workflow:
# FITS I/O
python -m pip install --upgrade 'cuphoton[io]==0.2.*'
# GPU imaging and fitting
python -m pip install --upgrade 'cuphoton[gpu]==0.2....cuPhoton 0.1.3
cuPhoton 0.1.3 is a source-only release for CPython 3.12β3.14 on Linux. It adds one FITS reader across the imaging workflows, spatially varying image subtraction in xPois, GPU-resident results in xPois and xFit, a reusable xPois β xFit β xScan device pipeline, and optional MPI and Dragon executors with persistent workers. xRay gains iterative fitting and compact detector spectra, and xDR fixes GPU buffer lifetimes and Gzip tile decoding.
For a hands-on walkthrough of cuPhotonβs GPU imaging workflow, read our NVIDIA Technical Blog post, Faster Scientific Image Analysis with NVIDIA cuPhoton.
cuPhoton 0.1.3 brings together 193 commits across 71 merged pull requests, adding 122 files and 82,553 net lines since v0.1.2 (86,231 added; 3,678 removed).
Contents π
- Highlights
- Performance
- Install
- Upgrading from 0.1.2
- What changed
- Known limitations and errata
- Contributors
Highlights π
- One FITS reader for every imaging workflow.
cuphoton.core.fits_ioserves xPois, xRep, xFit, and xScan with a shared--fits-reader auto|astropy|xdrpolicy, header-first inspection, and read receipts. xFit fits candidate stamps straight from FITS manifests, and xScan scores FITS candidates throughpredict_fits. #61, #62, #63, #64 - Spatially varying image subtraction.
solve_spatial_als(--solver spatial-als) fits separable kernels whose profiles vary across the image, in NumPy or CuPy FP64, alongside an experimental Gaussian-polynomial model. #25, #26, #27, #28, #29 - Results that stay on the GPU.
solve_constant_kernel_deviceandfit_dipoles_devicereturn CuPy results, andcuphoton.xscan.device_pipelinechains constant-kernel xPois, Gaussian xFit, and triplet xScan inference in oneDeviceWorkerContextthat loads the model once. #31, #12, #13, #42 - Persistent distributed workers. Shared MPI and Dragon executors run xPois image pairs, xFit candidate chunks, xScan inference minibatches, and the complete pipeline (
xscan run-pipeline), keeping CUDA contexts, inputs, and models across warmup and measured rounds. #10, #54, #56 - More xRay fitting options. Damped-cosine iterative fitting (
--fit-method iterative), batched detector FFTs, status-aware diagnostics with optional P2 ridge, and a losslesstile-rowsartifact layout. #9, #22, #23, #75 - xDR correctness fixes. Buffers remain owned until GPU work completes on success, error, and cancellation paths; unaligned Gzip tile payloads are repacked before DEFLATE decoding; independent reads proceed during GDS waits. #36, #81, #39
Measured timings for these changes are collected under Performance.
Performance π
Each figure is a measured speedup for the configuration and timing boundary stated in its pull request. Most compare whole workflows against a named baseline, so amortized startup, I/O, and transfer costs contribute as much as computation. Expect different factors on other hardware, data, and batch sizes.
- Persistent pipeline versus separate stages. On one RTX PRO 6000 Blackwell with synthetic 1024Γ1024 pairs (nine candidates each), warm
xscan benchmark-pipelinerounds had medians of 0.884β0.901 s, against 8.211β8.407 s for freshly started xPois, xFit, and xScan stage processes (9.3Γ). The stage figure includes process startup and intermediate files. #55 - xDR reads in xPois and xRep. Reading a registered image pair for constant-kernel xPois took 0.133 s with xDR instead of 2.20 s with Astropy (16.5Γ), and xRep on an HSC coadd went from 0.973 s to 0.211 s (4.6Γ). #62
- FITS candidate manifests in xFit. For 16 stamps from a retained image subtraction on one GPU, median ingress, crop, and validation fell from 0.764 s to 0.107 s (7.1Γ). #63
- FITS inputs in the device pipeline. On registered FITS inputs with 32 candidates, the one-GPU batch median fell from 15.65 s with Astropy to 10.76 s with xDR (1.45Γ); two-worker MPI and Dragon batches gained 1.26Γ and 1.30Γ. #64
- Dragon control plane. In a two-node, 64-worker control experiment, consumer-local command queues reduced later-round control medians from 47.2/45.3 ms to 33.6/28.1 ms under Python TCP (1.4β1.6Γ), and native HSTA TCP reached 2.4β3.1 ms (9β20Γ below Python TCP, depending on queue layout). At 256 GPUs the per-batch coordination remainder fell from 210β357 ms to 24β33 ms with consumer queues (6β15Γ) and 8.1β8.6 ms with HSTA (24β44Γ). On eight GB200 GPUs, whole-pipeline batch medians stayed at 7.5β7.7 s under every layout and transport. Dragon execution guide
Install π
Install from the v0.1.3 checkout with uv:
git clone --branch v0.1.3 https://github.com/NVIDIA/cuPhoton.git
cd cuPhotonChoose a profile for your workflow:
# CPU data inspection and NumPy/SciPy workflows
uv sync --locked
# GPU FITS I/O runtime dependencies only
uv sync --locked --extra io
# GPU workflows: I/O, photometry, PyTorch, Numba-CUDA
uv sync --locked --extra gpu
# GPU workflows with visualization
uv sync --locked --extra gpu --extra vizuv sync installs an editable Python package. The io and gpu extras supply runtime dependencies; native xDR requires a separate build with a C++17 compiler, CUDA 13 and cuFile development headers, and reentrant CFITSIO. Prepare the prerequisites in the xDR source build instructions, then run bash src/cuphoton/xdr/src/build.sh. The shared FITS reader can use Astropy without that extension. GPU execution needs a CUDA 13-compatible NVIDIA driver; GPUDirect Storage also needs a compatible host and storage configuration.
Extras compose: use uv sync --locked --extra gpu --extra viz --extra mpi for distributed GPU workflows with visualization. Include every extra you want to retain when changing profiles.
| Extra | Adds |
|---|---|
io |
CuPy, the CUDA 13 runtime with cuFile, KvikIO 26.6, and nvCOMP 5.2 for native FITS I/O (Linux) |
photometry |
Photutils background estimation, source detection, and aperture photometry |
torch |
PyTorch for CPU-capable workflows |
gpu |
io and photometry, plus PyTorch and Numba-CUDA on Linux |
viz |
Bokeh, Pillow, and Tornado |
cutile |
Experimental cuTile backend; needs an external CUDA 13.2 or newer compiler with tileiras, ptxas, and NVVM |
mpi |
mpi4py; the MPI implementation and launcher come from your environment |
dragon |
DragonHPC on Linux with CPython 3.12 or 3.13 |
dev |
Development, testing, formatting, and type-checking tools |
See the packaging guide for runtime requirements and native source builds, and optional runtimes for MPI, Dragon, and the cuTile PyTorch/compiler constraint. ARM64 caveats for PyTorch and Photutils are under Known limitations.
Upgrading from 0.1.2 π
- Python. ...


