Add OpenMP versions of axpby, bincount, dwconv, pointerchase, and sundials - #310
Open
zjin-lcf wants to merge 8 commits into
Open
Add OpenMP versions of axpby, bincount, dwconv, pointerchase, and sundials#310zjin-lcf wants to merge 8 commits into
zjin-lcf wants to merge 8 commits into
Conversation
Collaborator
Author
There was a problem hiding this comment.
Pull request overview
Adds OpenMP target-offload implementations for five existing benchmarks.
Changes:
- Adds axpby, bincount, dwconv, pointerchase, and SUNDIALS OpenMP variants.
- Adds portable build configurations for Intel, AOMP, NVHPC, and CMake.
- Introduces shared reference-based DWConv validation across backends.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/sundials-omp/Makefile.nvc |
Adds NVHPC build. |
src/sundials-omp/Makefile.aomp |
Adds AOMP build. |
src/sundials-omp/Makefile |
Adds Intel build. |
src/sundials-omp/LICENSE |
Adds licensing information. |
src/sundials-omp/kernels.cpp |
Implements OpenMP SUNDIALS kernels. |
src/sundials-omp/CMakeLists.txt |
Registers the CMake target. |
src/sundials-cuda/main.cpp |
Makes the shared banner backend-neutral. |
src/pointerchase-omp/Makefile.nvc |
Adds NVHPC build. |
src/pointerchase-omp/Makefile.aomp |
Adds AOMP build. |
src/pointerchase-omp/Makefile |
Adds Intel build. |
src/pointerchase-omp/main.cpp |
Implements OpenMP pointer chasing. |
src/pointerchase-omp/CMakeLists.txt |
Registers the CMake target. |
src/dwconv-sycl/Makefile |
Adds reference-header support. |
src/dwconv-sycl/main.cpp |
Adds reference validation. |
src/dwconv-sycl/CMakeLists.txt |
Adds the reference include path. |
src/dwconv-omp/Makefile.nvc |
Adds NVHPC build. |
src/dwconv-omp/Makefile.aomp |
Adds AOMP build. |
src/dwconv-omp/Makefile |
Adds Intel build. |
src/dwconv-omp/main.cpp |
Implements OpenMP depthwise convolution. |
src/dwconv-omp/CMakeLists.txt |
Registers the CMake target. |
src/dwconv-hip/Makefile |
Adds reference-header support. |
src/dwconv-hip/main.cu |
Adds reference validation. |
src/dwconv-hip/CMakeLists.txt |
Adds the reference include path. |
src/dwconv-cuda/reference.h |
Adds shared CPU reference logic. |
src/dwconv-cuda/Makefile |
Tracks the reference header. |
src/dwconv-cuda/main.cu |
Adds reference validation. |
src/bincount-omp/Makefile.nvc |
Adds NVHPC build. |
src/bincount-omp/Makefile.aomp |
Adds AOMP build. |
src/bincount-omp/Makefile |
Adds Intel build and precision flags. |
src/bincount-omp/main.cpp |
Implements OpenMP histogram kernels. |
src/bincount-omp/CMakeLists.txt |
Registers the CMake target. |
src/axpby-omp/Makefile.nvc |
Adds NVHPC build. |
src/axpby-omp/Makefile.aomp |
Adds AOMP build. |
src/axpby-omp/Makefile |
Adds Intel build. |
src/axpby-omp/main.cpp |
Implements chunked OpenMP AXPBY. |
src/axpby-omp/CMakeLists.txt |
Registers the CMake target. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // Per-team histogram. Declaring it in the teams region makes it | ||
| // shared by the team's threads and lets the compiler place it in | ||
| // team-local memory (LDS/SLM). | ||
| output_t smem[sharedMemoryCapacity / sizeof(output_t)]; |
Collaborator
Author
There was a problem hiding this comment.
The bincount-omp example is updated without using OMP5 dynamic allocation.
Remove the nonportable pointer-chase benchmark, make bincount adapt across GPU memory hierarchies, and ensure DWConv validation rejects NaNs. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds OpenMP target-offload versions of five existing benchmarks, each with the usual
Makefile,Makefile.aomp,Makefile.nvc, andCMakeLists.txt.axpby-ompandpointerchase-ompare self-contained.bincount-ompreusesbincount-cuda/reference.hfor verification.sundials-ompcompilesmain.cppandutils.cppfromsundials-cudaand provides its ownkernels.cpp.dwconv-ompreusesdwconv-cuda/reference.hfor verification.Two changes to existing benchmarks are included because the new programs depend on them:
[dwconv]replaces checksum reporting with reference-based validation.dwconv-cuda/reference.his new here, anddwconv-ompincludes it, so it cannot be split out. The CUDA, HIP, and SYCL versions are updated to use the same reference so all four report PASS/FAIL consistently.[sundials-cuda]drops "CUDA" from a printed message, sincesundials-ompcompiles that samemain.cpp.Test plan
amdclang++,ARCH=gfx90a).dwconv-hipbuilds withhipcc;dwconv-syclbuilds for the CUDA backend.