Radar performance assessment: EKF + RTS smoothing of a day of air traffic
/app/cpu/main.cpp is a multicore CPU program (C++17, OpenMP). It is built as
/app/bin/cpu_baseline with g++ -O3 -march=native -fopenmp -std=c++17 and run as
cpu_baseline INPUT_FILE
It reads one input file and writes its result to stdout.
What the program computes
A radar surveillance performance assessment, as done offline on a recorded day of air traffic: reconstruct a reference trajectory for every flight from the radar plots, then measure how each radar performs against it.
- Scenario (generated from
SEEDwithmix64, the SplitMix64 finaliser).Rrotating radars on a ring 250-320 km from the centre, each with a scan period of 16/20/32/40/48 ticks (1 tick = 0.25 s), a phase, a detection probability, range/azimuth noise and unknown range and azimuth biases (make_radar).Fflights, each with a start tick, a duration, a subset of radars that cover it and a smooth bounded truth trajectory (sum of two sinusoids per axis, closed-form position and velocity,make_flight/truth). - Plots. Radar
rlooks at a covered flight at ticksphase + k*periodinside the flight's window; scankgives a plot iffplot_key % 1000 < pd(integer decision). A plot is range = true range + bias + noise and azimuth =atan2+ bias + noise, the noise being a centred sum of four 32-bit hash uniforms (exact in double) timessqrt(3)and sigma. The plots of all covering radars are merged in (tick, radar) order. - Forward filter. Constant-velocity state (x, y, vx, vy), white-noise-acceleration process
noise of intensity
Q, one-point initialisation from the first plot (polar Jacobian position covariance, 250 m/s velocity sigma), then for each plot: predict overdt, EKF update with the polar measurement of that radar (nominal sigmas, biases unknown to the filter), azimuth innovation wrapped to (-pi, pi], covariance by the Joseph form. - Smoother. Rauch-Tung-Striebel pass backwards over the stored filtered states and covariances (gain via a 4x4 Cholesky solve of the predicted covariance).
- Statistics. Per radar: count, mean and standard deviation of range residuals (m) and azimuth residuals (microradians) of its plots against the smoothed trajectory - these estimate the radar's biases and noise. Per track-age bin (plot index within the flight, bins starting at 5, 10, 25, 50, 100, 250; the first 5 plots are excluded): filtered and smoothed position (m) and velocity (m/s) RMSE against the truth. ANEES (4-D NEES divided by 4) of filtered and smoothed estimates over the same plots. Four sample flights (indices 0, F/3, 2F/3, F-1): plot count, smoothed state at the first plot and at the last plot.
Per-flight sums are formed in plot order (backwards), added over chunks of 64 consecutive flights and the chunks are added in order. The work is double precision; reduced precision is not acceptable for the tolerance used.
Input format
One line: SEED R F SPAN LMIN LMAX Q - SEED 64-bit unsigned, 1 <= R <= 16,
0 <= F <= 200000, 1 <= SPAN <= 345600 (flight start ticks are in [0, SPAN)),
1 <= LMIN <= LMAX <= 115200 (flight duration in ticks), 0.1 <= Q <= 50 (decimal).
Output format
PLOTS <total> FLIGHTS <F>
RADAR r n mean_dr std_dr mean_daz_urad std_daz_urad (R lines)
AGE lo n filt_pos_rmse filt_vel_rmse smooth_pos_rmse smooth_vel_rmse (6 lines)
ANEES filtered smoothed
FLIGHT f n x0 y0 vx0 vy0 x1 y1 vx1 vy1 (4 lines, absent if F = 0)
Values are compared with relative tolerance 1e-7 and absolute tolerance 1e-3; counts must match.
Hidden inputs
Correctness inputs (12 files): F = 0, a single flight one tick long (no plots), a single
radar, 16 radars with 8-hour flights, simultaneous starts with fixed durations and Q = 0.1,
Q = 50, 300 very short flights, seed 0 and 2^64-1, and random settings with up to 400
flights. The timing input has 10 <= R <= 14, F about 85000*12/R (60k-100k flights),
SPAN = 345600, durations 2400-28800 ticks and 1 <= Q <= 4: about 3e8 plots in total.
Your task
Port this program to CUDA in /app/gpu/main.cu: same command line (PROGRAM INPUT_FILE),
same output on stdout. Then make it as fast as you can on the GPU while keeping the output correct.
The main computation must execute on the GPU. Renaming CPU code to .cu, running a
CPU fallback, or launching a dummy kernel while computing the answer on the CPU does not satisfy this task.
The CPU source is the specification: when this text and the code disagree, the code wins.
How you are scored
- Only
/app/gpu/main.cuis collected. It is compiled withnvcc -O3 -arch=sm_90 -std=c++17 -o port /app/gpu/main.cu; no extra libraries are linked. The CUDA runtime and the header-only libraries that ship with the CUDA toolkit (CUB, Thrust, libcu++) are allowed. - Your source must not contain any of:
system(,popen(,fork(,exec*,dlopen(,getenv(,#include <filesystem>,/tests/,/proc/. The program may read only the input file it is given. - GPU verification uses the backend selected for this run: an H100 attached to the separate verifier, or a remote H100 worker. Hidden inputs use a fresh random seed.
- For public GPU experiments, use
/app/bin/gpu_run [--backend auto|local|remote] [--repeat N] [--quiet] SOURCE.cu INPUT_FILE.... The default usesGPU_RUNNER_URLwhen configured, otherwise a GPU attached to this sandbox. Sandbox GPU access is configured independently from verification; a CPU-only sandbox needs a runner URL. - Correctness: every hidden input (small edge cases plus the timing input) must pass.
Your output must have the same tokens as the CPU program's output. Numeric tokens may differ by at most
atol + rtol*|expected|with rtol = 1e-07 and atol = 0.001; every other token must be identical. Any mismatch, crash or timeout gives reward 0. - GPU execution: a separate, untimed CUPTI check must observe completed GPU kernel activity on the hidden timing input. A CPU-only submission receives reward 0 even if its output is correct.
- Speed: The timing input has 10-14 radars and 60k-100k flights of 10 minutes to 2 hours over a 24-hour span, about 3e8 plots in total (each one filtered forward and smoothed backward). Your port and our GPU reference are each run on it
once to warm up and then 5 times, interleaved; the time is the wall clock of the whole process
(including CUDA initialisation, input parsing and output). When correct,
reward = min(2, t_reference / t_yours)using the medians. /app/inputs/holds a few public inputs./app/bin/run_public.shcompiles your port with the flags above and compares it against the CPU baseline on each of them.