You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implemented and closed out, including the (check GPU performance) half.
Parallel transport is wired through every kernel family — pair_frame / pair_direction / pair_delta / pair_invariants, with FlatGeometry and SphericalGeometry, right-handed n̂ = ẑ × r̂. Covered on CPU (serial, threaded, MPI, Distributed), KA.CPU() and CUDA.
Performance. The per-pair frame was rewritten onto ambient unit vectors, removing ~8 transcendentals per pair:
path
ns/pair
flat, SIMD kernel
28.0
flat, scalar kernel
38.7
sphere, before
198.2
sphere, after
65.0
3.05× on CPU. On an A100, single-pass 1-D throughput (10⁹ atom-pairs/s):
N
FT
euclidean
haversine
65 536
F32
44.2
31.7
65 536
F64
26.7
17.2
so spherical now runs at 61–72 % of flat throughput on device.
Two defects found and fixed on the way:
The joint-2D GPU kernels were width-2 only, so flat D = 3 joint-2D had never worked on GPU and spherical joint-2D broke once x became 3-wide. The codegen is now parameterised on coordinate width.
A silent conditioning failure at antipodal separation.geodesic_frame's docstring claimed ok = false for both coincident and antipodal pairs; it was false only at σ = 0. Measured against BigFloat on generic pairs, the returned direction was wrong by 38 % at π − σ = 1e-15 and accepted, with error scaling as ε/(π−σ). Fixed with a second tolerance on ‖p̂+q̂‖²; refusing is correct rather than conservative, since antipodal points are joined by infinitely many great circles.
Also added: a lat-lon fast path exploiting the zonal invariance of the geodesic frame (measured 147× faster than the pair loop on a 48×24 grid, pair counts exactly equal), and support for pixelized spheres (HEALPix) through the same entry point.
Activity
jbphyswx commentedon Sep 6, 2026
Implemented and closed out, including the
(check GPU performance)half.Parallel transport is wired through every kernel family —
pair_frame/pair_direction/pair_delta/pair_invariants, withFlatGeometryandSphericalGeometry, right-handedn̂ = ẑ × r̂. Covered on CPU (serial, threaded, MPI, Distributed),KA.CPU()and CUDA.Performance. The per-pair frame was rewritten onto ambient unit vectors, removing ~8 transcendentals per pair:
3.05× on CPU. On an A100, single-pass 1-D throughput (10⁹ atom-pairs/s):
so spherical now runs at 61–72 % of flat throughput on device.
Two defects found and fixed on the way:
D = 3joint-2D had never worked on GPU and spherical joint-2D broke oncexbecame 3-wide. The codegen is now parameterised on coordinate width.geodesic_frame's docstring claimedok = falsefor both coincident and antipodal pairs; it was false only atσ = 0. Measured againstBigFloaton generic pairs, the returned direction was wrong by 38 % atπ − σ = 1e-15and accepted, with error scaling asε/(π−σ). Fixed with a second tolerance on‖p̂+q̂‖²; refusing is correct rather than conservative, since antipodal points are joined by infinitely many great circles.Also added: a lat-lon fast path exploiting the zonal invariance of the geodesic frame (measured 147× faster than the pair loop on a 48×24 grid, pair counts exactly equal), and support for pixelized spheres (HEALPix) through the same entry point.