Feature #3311
GPU infrastructure development
Description
General goal is to develop platform-agnostic infrastructure for CUDA and OpenCL with perspective expansion to other technologies (SYCL?).
Subtasks
Related issues
Associated revisions
Make OpenCL DeviceVendor into enum class and move to GPU traits
The device context in OpenCL requires the information on vendor when
constructed. To prepare for opaque DeviceContext, the vendor
enum was moved into OpenCL traits.
Refs. #3311, needed for #3315.
Change-Id: Iec22ff17543b6a99407048de6e0cd82bb7218fb0
Use init(..) function to build DeviceContext
This patch unifies the logic of OpenCL context creation in PME and
NBNXM by using the same init(..) function for the DeviceContext
object.
Also, the DeviceInfo is now de-referenced directly after the check
on the pointer validity and passed along as a const reference, which
improves the clarity of the code.
Change-Id: I5ba0f530918f3340fa1a5ad3e8d60fe4e0967dab
Take over management of OpenCL context from PME and NBNXM
This patch set creates the DeviceContext in runner and passes it to the
consumers (PME and NBNXM). This removes unnessesary management code
duplication, makes the device buffers in two modules compatible.
Fixes #2522
Fixes #3315
Refs #3311
Change-Id: I10358cfaced5b5c7dbdddf95679c9a9703f3a2c0
Introduce DeviceStreamManager
Make a separate object that will be handling the creation,
management and destruction of the GPU context and streams.
It is detached from the rest of the code in this patch,
but will be attached in the follow-up.
Change-Id: I2c59b930ac266d89fafe9e0172b83f07e9858f0b
Make use of the DeviceStreamManager
Use the DeviceStreamManager throughout the code. The manager is
owned by the runner and created when GPU is active. The consumers
get the context and streams if needed.
TODOs:
1. Make builders and move the selection on whether the stream should
be created there. The builders should take the manager and pass
the context and the stream to the consumer. Builders should have
the option to create a stream.
2. Makefile in ewald tests uses old infrastructure. Also, the device
context management should be lifted from there and utilized in
all the tests that can run on GPU hardware.
Change-Id: I0d08adbe1dee19c1890e55f0e0cf79cea97d39bd
History
#1 Updated by Artem Zhmurov 12 months ago
- Tracker changed from Task to Feature
#2 Updated by Artem Zhmurov 12 months ago
- Target version set to 2021-refactoring
#3 Updated by Szilárd Páll 12 months ago
- Related to Task #2936: introduce check that CPU-GPU transfers/assignments are made between compatible types added
Split and move the checkDeviceBuffer(...) function from PME
Resolving a TODO.
Also fixed the formatting in neighboring comment.
Refs. #3311.
Change-Id: I1687981cc80e2388714cbbb3113f37e34582e31c