Skip to content

Latest commit

 

History

History

level1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Level 1: Standalone GPU Benchmarks

45 selected small GPU benchmarks extracted from five upstream suites (HeCBench, RAJAPerf, NPB-GPU, Hetero-Mark, Rodinia) and repackaged so each one can be configured, built, run, and validated independently of its original suite framework. Extraction preserves upstream algorithms and workloads, but not upstream's compile flags: every benchmark builds with the one uniform Level 1 flag set (below). The other deliberate exceptions (each documented in the benchmark's README and commit) are bug fixes -- srad_v1's reduction index (class D), binary_search's query range at 2^27 elements, bezier_surface's kernel guard and input handling, hotspot_3d's final iterate (the output is now the temperature after N steps, upstream returned step N-1), nearest_neighbor's k-nearest selection (upstream lost records from k = 364 on) and input handling, backprop's host code -- and correctness criteria that replace upstream checks shown to pass wrong results or reject legitimate ones (nbody, pagerank, hotspot_3d's per-element gate, lud's residual evaluation, binary_search's verify() on by default, nearest_neighbor's record identities, needleman_wunsch's alignment score).

Driver changes for the measurement (Level 1 rule, see Runtime measurement; driver code only, never a kernel or a workload, each commented where it is made): the in-process warm-ups are removed -- the runner's warm-up Run() of aes, black_scholes, color_histogram, fir and pagerank, the untimed warm-up launches of atomic_reduction and block_scan, histogram's untimed verification launch, cg's host conj_grad warm-up, ft's start-up pass and mg's host start-up sequence -- and a check that compared a warm-up result (block_scan, histogram) now compares the timed result, after the ROI; input-independent device queries run before the ROI (atomic_reduction, nearest_neighbor, NPB setup_gpu_device). Since the driver/implementation split (2026-11-24, below) every ROI is one entry around impl_run with no exclude: input provision and output buffers sit in the driver before it, prints and checks after it, upstream's own timers (and the syncs that only served them) are gone, Hetero-Mark's runner/logger framework is reduced to a driver class, and NPB prints Time 0.00. fir's input seed is fixed (1, upstream time(NULL); HPCPERF_RANDOM_SEED=time restores the clock seed), so its registered inputs are reproducible. Fixes of 2026-11-24 (described in each benchmark's README): a device error now fails the run (exit 1) wherever upstream left the device calls unchecked (ao_bench, the RAJAPerf kernels, nearest_neighbor and srad_v1 already checked theirs); size guards refuse (exit 2) the sizes the kernels cannot compute correctly instead of printing a wrong result (aes, atomic_reduction, binary_search, burgers_equation, channel_shuffle, color_histogram, fir, pagerank); needleman_wunsch zeroes the boundary row and column its traceback reads and fixes the traceback loop condition (a comma operator tested only j >= 0); ft zeroes sums_device before its checksums atomicAdd into it; nbody copies the final particle state back inside the ROI on every run; lud's unused, never-freed m_debug buffer, mg's duplicated set-up/zero3/zran3 and cg's duplicated start-vector reset are removed; black_scholes exits on a sticky device error instead of polling forever. HIP only (untested): fir imports upstream Hetero-Mark's memory-manager headers, and the Hetero-Mark sources that carry the ROI markers are compiled as LANGUAGE HIP.

Build and validate (per benchmark, after source hpcperf_env.sh):

python3 tools/golden/golden_artifacts.py fetch level1/<benchmark>   # once per clone, if it has reference/ (see Correctness)
cmake -S level1/<benchmark> -B build/<benchmark>/cuda -DBACKEND=CUDA -DCMAKE_BUILD_TYPE=Release
cmake --build build/<benchmark>/cuda
ctest --test-dir build/<benchmark>/cuda --output-on-failure

Driver and implementations (since 2026-11-24, all 45 benchmarks). Every benchmark has a frozen driver (cuda/main.cu, or the benchmark's existing main file: arguments, input provision into host memory, cudaFree(0), the one ROI entry HPCPERF_ROI_BEGIN_SYNC -> impl_run(in, out) -> HPCPERF_ROI_END_SYNC, the device-error check, golden capture, checks and prints) and one or more implementations cuda/impl/<version>.cu behind the benchmark's interface cuda/impl/impl.h (host-memory Input / Output): everything the ROI holds -- allocation, uploads, the kernels with all repetitions, copy-back, host steps of the result -- with one fixed launch configuration (upstream's first), no prints and no upstream timers. The ROI has no excludes. A benchmark with several implementations of the same task (all_pairs_distance k1-k3, binary_search bs1-bs4, atomic_reduction v1-v16, block_scan raking / raking_memoize / warp_scans, histogram smem / gmem, background_subtraction split / merged) builds one executable per version, <benchmark>_<version>_cuda, registered in its inputs.yaml versions block (entry.path with a {version} placeholder); every run is one version, and tools/timing measures one case per input and version (<input>@<version>). A single implementation keeps <benchmark>_cuda (cuda/impl/default.cu). The block-size / items-per-thread sweeps of atomic_reduction and block_scan are gone: each version runs upstream's first configuration (block 128; 1024 threads x 1 item), the rest is the optimizer's to tune. The device code of every kernel is unchanged (SASS identical to the pre-split build).

Size tiers (since 2026-11-24). The registered performance inputs of every benchmark are three size tiers s / m / l of its task, chosen by the device footprint the implementation allocates (targets 8 / 64 / 192 MiB: well inside, about half of and just beyond the B200's 126.5 MiB L2), per tier group where a benchmark has problem parameters (histogram's data type, bilateral_filter's radius, channel_shuffle's layout); every version runs every tier. A pure repetition (a pass that recomputes the same result from the same input) is 1, accumulating repetitions (daxpy, ltimes, adam) and the task's own time steps keep upstream's values; NPB uses its official classes. Sizes, problem parameters and the generators of large inputs (aes, pagerank, bfs, hotspot, hotspot_3d, nearest_neighbor) are driver arguments; the no-argument behaviour is upstream's. The tiers are a platform-independent definition (inputs.yaml tiers: block; rule: tools/inputs/README.md "Size tiers", each benchmark's README "Size tiers"); they replaced the earlier inputs, and the correctness-probe inputs are unchanged. New tiers have no golden reference yet.

Dead work removed and two tasks redefined (2026-11-29, the user's decision). A code audit of all 45 benchmarks found upstream work inside the ROI whose result nothing uses; an optimizer would win it back for free, so it is gone from the baselines: black_scholes' zero-filled host price arrays and their two uploads (the kernel overwrites both device arrays), burrows_wheeler_transform's copy-back of the whole rotation table (freed unused) and mg's upload of a host residual array nothing writes (10.5 of the 60.9 ms class-B ROI); the outputs are unchanged by construction (black_scholes' golden check and mg's NPB verification pass; burrows_wheeler_transform's tiers have no reference yet). Two benchmarks whose dead work was the task itself were redefined (class E, outputs and inputs changed, their golden references must be re-made): block_scan (every thread block scanned the same tile, so grid_size only replicated work -- now block b scans its own tile b; new tiers by footprint) and floyd_warshall (every launch relaxed the same input, so only the last counted -- now the steps are chained, true Floyd-Warshall on non-negative weights; inputs renamed n<size>-r1). Each README records the details.

Build flags (since 2026-11-24): one uniform set for every benchmark, defined once in hpcperf_level1_flags.cmake and included by every benchmark's CMakeLists.txt, which sets no flags of its own (tools/timing/tests/run_all.sh test 9b checks this). A speed-up of a benchmark has to come from changing the application, never from its compile flags, so the upstream suites' per-benchmark flags are not reproduced (HeCBench aobench and Rodinia lud -use_fast_math, RAJAPerf -restrict, NPB -use_fast_math -fopenmp, Rodinia hotspot3D -g -G, Rodinia Makefiles without -O). The set: Release -O3 -DNDEBUG for C, C++, CUDA and HIP; C++20; CUDA -use_fast_math (device single precision only: flush-to-zero, approximate division, square root and transcendentals; double precision and host code unaffected) and HIP -ffast-math for the device compilation only (untested); host code IEEE (no -ffast-math, no -march); no OpenMP (ft's three OpenMP-dispatched set-up steps run one after the other, as in upstream's HIP version); no -restrict (a global no-alias assertion -- restrict belongs in the source); CUDA architecture native unless given for the whole build; nvcc's host compiler pinned to the configure's C++ compiler (-ccbin). Program configuration that an upstream Makefile passed as -D lives in the source (needleman_wunsch TRACEBACK). No per-benchmark definition is left: NPB's opt-in -DHPCPERF_NPB_PROFILING=ON per-kernel timer table went away with the split into driver and implementation (2026-11-24). Fast math changes single-precision results: the golden references frozen before 2026-11-24 come from builds without it, so the benchmarks with single-precision output need their references re-validated under the uniform flags (tools/golden/README.md).

Status legend:

  • Working -- configure + build + run + correctness validation all verified on the B200 reference machine (CUDA 13.2, GCC 13.3.0, C++20).
  • HIP untested -- upstream HIP source extracted and a HIP build configuration exists, but there is no AMD GPU / ROCm stack on the development machine, so it is not compile- or run-verified.
  • HIP pending -- upstream has no HIP implementation; porting is deferred.
  • Borderline Level 1 -- the CUDA source (the validated backend; CUDA LOC column) exceeds the ~2000 LOC guideline; flagged for review, not removed.
  • Blocked -- cannot be delivered as specified; see the benchmark README.

LOC = non-blank, non-comment lines of the C/C++/CUDA/HIP sources (.cu .cuh .c .cc .cpp .h .hpp .hip) in the benchmark's cuda/ + common/ (CUDA) and hip/ + common/ (HIP) directories (shared common/ code counted in both; data files, build files and validation scripts excluded), recounted on 2026-11-24 from the current sources, i.e. including the golden-capture, ROI and error-check additions. The import-time counts (cloc, 2026-09-01) were smaller and missed the .hip files of the aes, color_histogram, fir and pagerank HIP ports; the count used here reproduces every import-time value when run on the import commit with .hip files left out.

Runtime measurement

Working in the catalog above is a correctness statement; it says nothing about speed. Runtime is measured over each benchmark's region of interest (ROI) -- from the input in host memory to the checked result in host memory (device allocation, uploads and the result copy-back inside; process start-up, the device context and verification outside; no in-process warm-up -- the "Level 1 rule" of tools/timing/roi/README.md, since 2026-11-09) -- which the sources mark with tools/timing/roi/hpcperf_roi.h (every benchmark, CUDA and HIP; a no-op unless measuring, so ctest is unchanged):

tools/timing/measure_level1.sh --build-root build/gcc13 all   # 1 warm-up + 5 clean + 1 profiled run per case
python3 tools/timing/summarize.py                             # JSON per run + summary_level1.csv

Correctness. 38 benchmarks compare their captured outputs with a frozen B200 golden reference (reference/<input>.json, raw bytes in the content-addressed golden store; tools/golden/README.md); several also have correctness-only probe inputs (purpose: correctness-probe, never timed). The CPU reference implementations stay in the sources and run only with HPCPERF_CPU_REFERENCE=1 (hpcperf_golden.py make, once per input) -- no plain run, ctest, registry check or measurement runs them. The others: NPB cg ep ft mg (official class values), ao_bench (frozen image hash), lud (the residual max|A - L*U| of the captured factors, post-run), gaussian_elimination (property check). A fresh clone has no golden store: until the bundles are published, the tolerance-rule golden checks (most ctests) FAIL with "golden blob ... missing" -- restore it with python3 tools/golden/golden_artifacts.py fetch --from <staging dir> (tools/golden/DISTRIBUTION.md). Measurement sets HPCPERF_SKIP_VERIFY=1. It switches off binary_search's verify() (on by default) and lud's upstream host recomposition (-v, which runs only with HPCPERF_CPU_REFERENCE=1 anyway; lud then prints SKIP_VERIFY); elsewhere it only keeps the CPU reference off (hpcperf_cpu_reference_enabled() of tools/golden/hpcperf_golden.h returns 0 when it is set), which is off by default anyway. All of these checks lie outside the ROI. See tools/timing/README.md and tools/timing/roi/README.md.

Catalog

Benchmark Source suite Brief summary CUDA HIP CUDA LOC HIP LOC Status
adam HeCBench Updates model parameters using Adam optimization. working untested 229 229 Working
all_pairs_distance HeCBench Computes pairwise distances between point sets. working untested 277 277 Working
ao_bench HeCBench Renders ambient occlusion through ray sampling. working untested 379 379 Working
atomic_reduction HeCBench Reduces values using GPU atomic operations. working untested 258 258 Working
background_subtraction HeCBench Extracts foreground objects from a background model. working untested 281 281 Working
bezier_surface HeCBench Evaluates points on a Bézier surface. working untested 318 318 Working
bilateral_filter HeCBench Performs edge-preserving image smoothing. working untested 251 251 Working
binary_search HeCBench Searches sorted arrays in parallel. working untested 328 328 Working
bitonic_sort HeCBench Sorts values using a bitonic sorting network. working untested 152 152 Working
block_scan HeCBench Computes the block-level exclusive prefix sum of each of grid_size 1024-int tiles, one thread block per tile (task redefined 2026-11-29; upstream's blocks all scanned one tile). working untested 326 326 Working
burgers_equation HeCBench Advances a finite-difference Burgers equation solver. working untested 311 311 Working
burrows_wheeler_transform HeCBench Applies the Burrows-Wheeler data transformation. working untested 177 177 Working
channel_shuffle HeCBench Rearranges channels in tensor data. working untested 325 325 Working
histogram HeCBench Counts input values into histogram bins. working untested 1250 1250 Working
murmurhash3 HeCBench Computes MurmurHash3 hashes for independent keys. working untested 308 308 Working
nbody HeCBench Simulates pairwise interactions among particles. working untested 397 397 Working
daxpy RAJAPerf Performs the vector update y = αx + y. working untested 232 232 Working
del_dot_vec_2d RAJAPerf Computes a 2D divergence-like mesh operator. working untested 405 405 Working
energy RAJAPerf Updates energy quantities in a hydrodynamics kernel. working untested 500 500 Working
fdtd_2d RAJAPerf Advances 2D electromagnetic fields using FDTD. working untested 310 310 Working
floyd_warshall RAJAPerf All-pairs shortest paths by Floyd-Warshall on non-negative weights, one launch per step k, each reading the previous step's matrix (task redefined 2026-11-29; upstream relaxed the same pin N times, so only the last launch counted). working untested 238 238 Working
jacobi_2d RAJAPerf Performs iterative 2D Jacobi relaxation. working untested 255 255 Working
ltimes RAJAPerf Performs a transport tensor contraction. working untested 265 265 Working
mat_mat_shared RAJAPerf Performs tiled matrix multiplication using shared memory. working untested 332 332 Working
matvec_3d_stencil RAJAPerf Applies a 3D stencil matrix-vector operator. working untested 441 441 Working
pressure RAJAPerf Computes cell-wise fluid pressure values. working untested 301 301 Working
cg NPB-GPU Runs a sparse conjugate-gradient computation. working untested 1601 1878 Working
ep NPB-GPU Generates Gaussian random pairs independently. working untested 793 1082 Working
ft NPB-GPU Performs a three-dimensional fast Fourier transform. working untested 1663 1961 Working
mg NPB-GPU Performs multigrid smoothing and grid transfers. working untested 1816 2095 Working
aes Hetero-Mark Encrypts data blocks using AES-256. working untested 724 727 Working
black_scholes Hetero-Mark Prices European options using Black-Scholes. working untested 314 314 Working
color_histogram Hetero-Mark Builds a histogram of image color values. working untested 215 218 Working
fir Hetero-Mark Applies a finite impulse response filter. working untested 288 284 Working
pagerank Hetero-Mark Iteratively computes PageRank scores on a graph. working untested 464 466 Working
backprop Rodinia Trains a neural network using backpropagation. working pending 753 - Working
bfs Rodinia Traverses graph levels using breadth-first search. working pending 370 - Working
gaussian_elimination Rodinia Solves linear systems using Gaussian elimination. working pending 344 - Working
hotspot Rodinia Simulates two-dimensional chip heat diffusion. working pending 343 - Working
hotspot_3d Rodinia Simulates three-dimensional chip heat diffusion. working pending 344 - Working
lud Rodinia Performs LU decomposition of a dense matrix. working pending 502 - Working
nearest_neighbor Rodinia Finds nearest points based on spatial distance. working pending 481 - Working
needleman_wunsch Rodinia Performs global sequence alignment with dynamic programming. working pending 365 - Working
pathfinder Rodinia Finds minimum-cost paths through a grid. working pending 212 - Working
srad_v1 Rodinia Applies speckle-reducing anisotropic diffusion. working pending 630 - Working

Summary: 45/45 Working (CUDA validated before the 2026-11-24 change to the uniform build flags; re-validation under those flags pending): 16 HeCBench, 10 RAJAPerf, 4 NPB-GPU, 5 Hetero-Mark, 10 Rodinia. Selection changes: (2026-11-24) the four Kokkos Kernels entries (graph_coloring, spadd, spgemm, spmv) were removed -- they were manual CUDA/HIP ports written for this repository, not extractions of upstream code, and a provenance audit against Kokkos Kernels 23a699f found their workloads, defaults and parts of their algorithms to be the port's own (their sources remain in the git history); (2026-11-24) NPB is was removed -- its input keys are generated on the device, its result (the ranks) never leaves the device and its partial verification runs inside the ranking kernel, so it cannot be stated as a task from an input in host memory to a result in host memory (the Level 1 rule); (2026-08-31) triangle_counting (Kokkos Kernels) was removed and replaced by murmurhash3 (HeCBench) because upstream Kokkos Kernels has no GPU triangle-counting implementation to extract (its GPU functor is an empty stub). No benchmark is flagged Borderline Level 1 any more: the guideline counts the CUDA source, and mg (2221 CUDA lines before the 2026-11-24 split) fell to 1816 once its dead host code (the host mg3P and the routines only it reached) was removed; the HIP port of mg (2095) still exceeds 2000 lines.