Skip to content

Port 12 benchmarks to Kokkos#68

Merged
kento merged 5 commits into
masterfrom
copilot/port-benchmarks-for-kokkos-please-work
Apr 12, 2026
Merged

Port 12 benchmarks to Kokkos#68
kento merged 5 commits into
masterfrom
copilot/port-benchmarks-for-kokkos-please-work

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 12, 2026

HeCBench had 361 benchmarks lacking Kokkos implementations. This PR adds initial Kokkos ports for 12 of them.

New *-kokkos directories

Each adds main.cpp + Makefile using system Kokkos 3.7 (OpenMP backend):

Benchmark Description
epistasis SNP genome pairwise analysis
fpc Frequent Pattern Compression
kalman Kalman filter
knn K-nearest neighbors
libor LIBOR market model Monte Carlo
mallocFree Device allocation/free timing
matrixT Matrix transpose
nms Non-maximum suppression
particle-diffusion Particle diffusion simulation
pitch Pitched memory access patterns
scan Parallel prefix scan (with/without bank-conflict avoidance)
sheath Plasma sheath simulation

Porting conventions

  • SYCL parallel_for(nd_range)Kokkos::parallel_for / parallel_reduce
  • Device memory via Kokkos::View, transfers via Kokkos::deep_copy
  • Atomics via Kokkos::atomic_fetch_add
  • All kernels wrapped in Kokkos::initialize / Kokkos::finalize
  • Makefile links against system Kokkos: -lkokkoscore -lkokkoscontainers -fopenmp -lpthread -ldl

Copilot AI and others added 5 commits April 12, 2026 13:59
Port three SYCL benchmarks to Kokkos 3.7:
- kalman-kokkos: Kalman filter on batched time series, one thread per series
- libor-kokkos: LIBOR Monte Carlo with nogreek/greek kernels, stride loops
- particle-diffusion-kokkos: Water molecule diffusion Monte Carlo

All benchmarks build and run correctly on Kokkos OpenMP backend.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: kento <1034379+kento@users.noreply.github.com>
- particle-diffusion-kokkos: replace bitwise & with logical && in bounds check
- libor-kokkos: add comment explaining intentional L_b -> L aliasing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: kento <1034379+kento@users.noreply.github.com>
- mallocFree-kokkos: times Kokkos::View allocation/deallocation for
  sizes 64B–16MB (device and host memory spaces)
- pitch-kokkos: compares pitched (64-byte aligned rows) vs simple
  2D/3D sigmoid kernels using MDRangePolicy<Rank<2|3>>
- matrixT-kokkos: 8 matrix-transpose variants using MDRangePolicy
  (OpenMP backend does not support team_size=256; MDRangePolicy
  faithfully replicates each variant's access pattern and passes PASS)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: kento <1034379+kento@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: kento <1034379+kento@users.noreply.github.com>
Successfully ported: epistasis, fpc, kalman, knn, libor, mallocFree,
matrixT, nms, particle-diffusion, pitch, scan, sheath

Skipped: langford (complex DFS with template recursion),
         matern (complex 2D scratch memory with non-standard constants),
         sad (requires external bitmap image files)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: kento <1034379+kento@users.noreply.github.com>
@kento kento marked this pull request as ready for review April 12, 2026 14:47
@kento kento merged commit a025d31 into master Apr 12, 2026
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.

2 participants