Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocl: prepared OpenCL backend for CP2K's Offload/DBM/DBT libraries #742

Merged
merged 1 commit into from
Dec 16, 2023

Conversation

hfp
Copy link
Member

@hfp hfp commented Dec 15, 2023

  • Introduced ACC_OPENCL_MEM_DEBUG for some debug details.
  • Auto-detecting device-memory offset (ACC_OPENCL_MEM_OFFSET), i.e., range-finding device pointers to adjust the offset accordingly.
    • c_dbcsr_acc_memcpy_d2d, c_dbcsr_acc_memcpy_h2d,
    • c_dbcsr_acc_memcpy_d2h, c_dbcsr_acc_opencl_memset.
  • Resolved cast-qual warnings.
  • Removed ACC_OPENCL_MEM_NOALLOC/ACC_OPENCL_MEM macros.
  • Improved performance when using clEnqueueFillBuffer.
  • Allow stream-argument (ACC-interface) to be NULL
    • Introduced c_dbcsr_acc_opencl_stream_default().
    • Implemented ACC_OPENCL_STREAM_NULL.
    • Enables synchronous operation).
  • Exposed/implemented OpenCL-only c_dbcsr_acc_opencl_memset, and based c_dbcsr_acc_memset_zero on c_dbcsr_acc_opencl_memset.
    • Allow custom memset-value to match CP2K's offload library
  • Adjusted console output (ACC_OPENCL_VERBOSE).
  • Revised acc_opencl.sh (generating kernel header).
  • Increased number of repetitions of standalone benchmark.
  • Updated tuned parameters.

* Introduced ACC_OPENCL_MEM_DEBUG for some debug details.
* Auto-detecting device-memory offset (ACC_OPENCL_MEM_OFFSET), i.e.,
  range-finding device pointers to adjust the offset accordingly.
  - c_dbcsr_acc_memcpy_d2d, c_dbcsr_acc_memcpy_h2d,
  - c_dbcsr_acc_memcpy_d2h, c_dbcsr_acc_opencl_memset.
* Resolved cast-qual warnings.
* Removed ACC_OPENCL_MEM_NOALLOC/ACC_OPENCL_MEM macros.
* Improved performance when using clEnqueueFillBuffer.
* Allow stream-argument (ACC-interface) to be NULL
  - Introduced c_dbcsr_acc_opencl_stream_default().
  - Implemented ACC_OPENCL_STREAM_NULL.
  - Enables synchronous operation).
* Exposed/implemented OpenCL-only c_dbcsr_acc_opencl_memset,
  and based c_dbcsr_acc_memset_zero on c_dbcsr_acc_opencl_memset.
  - Allow custom memset-value to match CP2K's offload library
* Adjusted console output (ACC_OPENCL_VERBOSE).
* Revised acc_opencl.sh (generating kernel header).
* Increased number of repetitions of standalone benchmark.
* Updated tuned parameters.
@hfp
Copy link
Member Author

hfp commented Dec 16, 2023

During CMake's configure step, GCC/latest test runs into the following issue:

-- Checking for module 'mpi-c'
--   Package 'mpi-c', required by 'virtual:world', not found
-- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS) 
-- Checking for module 'mpi-cxx'
--   Package 'mpi-cxx', required by 'virtual:world', not found
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS) 
-- Checking for module 'mpi-fort'
--   Package 'mpi-fort', required by 'virtual:world', not found
-- Could NOT find MPI_Fortran (missing: MPI_Fortran_LIB_NAMES MPI_Fortran_F77_HEADER_DIR MPI_Fortran_MODULE_DIR MPI_Fortran_WORKS) 
CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND MPI_Fortran_FOUND C
  CXX Fortran)

I will ignore this as unrelated and perhaps merge this PR (if everything else is fine).

@hfp hfp merged commit 20980ef into cp2k:develop Dec 16, 2023
19 of 20 checks passed
@alazzaro
Copy link
Member

Yes, sorry, my fault... I will fix it...

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