Task #3315
Feature #3311: GPU infrastructure development
Feature #3313: Introduce and use opaque types for the DeviceStream and DeviceContext
Platform agnostic DeviceContext
Description
Introduce opaque DeviceContext data type
Code:
1. https://gerrit.gromacs.org/#/c/gromacs/+/15597/ - Make OpenCL DeviceVendor into enum class and move to GPU traits.
2. https://gerrit.gromacs.org/#/c/gromacs/+/15599/ - Move DeviceInfo into GPU traits.
3. https://gerrit.gromacs.org/#/c/gromacs/+/15600/ - Make DeviceContext into a proper class.
4. https://gerrit.gromacs.org/#/c/gromacs/+/15657/ - Make use of non-default constructor of DeviceContext.
5. https://gerrit.gromacs.org/#/c/gromacs/+/15658/ - Take over management of OpenCL context from PME and NBNXM.
Associated revisions
Make DeviceContext into a proper class
Having DeviceContext as a platform-agnostic class allows one
to easily create context, which is usefull for setting up the
GPU stream/context manager, tests for GPU functionality.
Refs. #3315.
Change-Id: I496d225b58c96d7642830c8e9552139750891849
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
History
#1 Updated by Artem Zhmurov about 1 year ago
- Tracker changed from Feature to Task
- Assignee set to Artem Zhmurov
- Target version set to 2021
#2 Updated by Artem Zhmurov about 1 year ago
- Status changed from New to Accepted
#3 Updated by Artem Zhmurov about 1 year ago
- Target version changed from 2021 to 2021-refactoring
#4 Updated by Artem Zhmurov 12 months ago
- Description updated (diff)
#5 Updated by Artem Zhmurov 12 months ago
- Status changed from Accepted to In Progress
#6 Updated by Artem Zhmurov 12 months ago
- Description updated (diff)
#7 Updated by Artem Zhmurov 11 months ago
- Status changed from In Progress to Resolved
Applied in changeset 6975fbfd22030a08bbe076151a3de69894a4de2f.
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