Examples of OpenMP offload code are not plentiful. Some places I've found to get example code.
The OpenMP organization maintains examples along with the standard
- https://github.com/OpenMP/Examples (see the tags for different standard versions)
- Links to the Examples documents are on the Specifications page.
- Programming Your GPU with OpenMP: Performance Portability for GPUs - An excellent guide to OpenMP offload programming.
- Associated website: https://ompgpu.com/
- Tutorial files: https://github.com/vlkale/OpenMP-tutorial
- OpenMP 4.5 examples: https://github.com/colleeneb/openmp45_examples
- From Oak Ridge National Laboratory
- Part 1: Basics of Offload
- Part 2: Optimization and Data Movement
- Calling nvblas, cublas, and MKL: https://github.com/colleeneb/openmp_offload_and_blas
- Examples with memory access issues: https://github.com/RWTH-HPC/DRACC.git
- OpenMP tests directory in clang: https://github.com/llvm/llvm-project/tree/main/clang/test/OpenMP
- libomptarget tests in openmp: https://github.com/llvm/llvm-project/tree/main/openmp/libomptarget/test
- Large collection of kernels and small codes in CUDA/HIP/Sycl/OpenMP: https://github.com/zjin-lcf/HeCBench