Skip to content

feat(fdtd): add multi-GPU joint solve#1

Merged
Asixa merged 1 commit into
masterfrom
feature/fdtd-multi-gpu-joint-solve
Jul 15, 2026
Merged

feat(fdtd): add multi-GPU joint solve#1
Asixa merged 1 commit into
masterfrom
feature/fdtd-multi-gpu-joint-solve

Conversation

@Asixa

@Asixa Asixa commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

  • add public FDTDParallelConfig and a single-process DistributedFDTD x-slab execution core
  • keep Python as the control plane while sharing the same native CUDA Yee/CPML/ADE numerical kernels with single-GPU FDTD
  • add six bounded native standard-field operations, CUDA P2P halo exchange, stream/event overlap, and ownership-aware source and monitor assembly
  • add gathered and sharded Result persistence, Stable ABI v2 handling, capacity preflight, diagnostics, documentation, and a hardware benchmark harness

User impact

A single FDTD simulation can span homogeneous peer-accessible NVIDIA GPUs without replicating the full volumetric field state on every device. Monitor-first output preserves the aggregate-memory benefit; explicit full-field gathering remains opt-in and capacity checked.

Supported and hardware-qualified paths include uniform/nonuniform grids, CPML, scalar/diagonal linear media, conductivity, electric/magnetic ADE, point/time/plane/flux/mode monitors, multi-frequency DFT, early shutoff, and sharded persistence. Unsupported combinations fail during preparation instead of silently changing physics.

Validation

Built the native extension cleanly with CUDA 13 on two NVIDIA RTX A6000 GPUs connected by NV4.

  • multi-GPU suite: 114 passed
  • native CUDA suite: 65 passed
  • focused public Simulation/monitor/source regression: 31 passed
  • six-field, multi-frequency DFT, magnetic ADE, early-shutoff, monitor, and sharded-persistence parity passed
  • Plane/Flux/Mode single-vs-dual-GPU numerical cases observed exact agreement

Hardware benchmarks:

  • vacuum 257^3: 3.4659 -> 1.7559 ms/step, 1.9739x strong speedup
  • CPML dielectric: 1.0040 -> 0.8116 ms/step, 1.2370x
  • two-frequency full-field DFT: 1.7001 -> 1.1110 ms/step, 1.5303x
  • vacuum weak-scaling efficiency: 99.27%
  • bidirectional P2P bandwidth: 52.65-52.69 GB/s
  • peak per-GPU state was 1.0106x ideal half-single-GPU allocation for the vacuum case

The small 129x65x65 DFT case is documented as below break-even (0.267x).

Scope and limitations

This is an engineering-preview single-node P2P forward runtime. This host could not qualify 3/4 GPU, PCIe-only, or Nsight profiler evidence. NCCL/multi-node, distributed adjoint, peer-aware CUDA Graph capture, x-periodic/Bloch/symmetry, advanced source families, nonlinear/full-off-diagonal media, and SIBC remain explicitly guarded.

See docs/reference/fdtd-multi-gpu-joint-solve.md for the complete support and acceptance matrix.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

@Asixa
Asixa merged commit 9131c89 into master Jul 15, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant