Project

General

Profile

Task #3315

Feature #3311: GPU infrastructure development

Feature #3313: Introduce and use opaque types for the DeviceStream and DeviceContext

Platform agnostic DeviceContext

Added by Artem Zhmurov 9 months ago. Updated 7 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
uncategorized
Close

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

Revision ca9c6942 (diff)
Added by Artem Zhmurov 9 months ago

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

Revision e742ad10 (diff)
Added by Artem Zhmurov 9 months ago

Move DeviceInfo into GPU traits

The DeviceInfo is needed upon construction of DeviceContext. To
prepare for opaque DeviceContext type, it is moved to GPU traits
and renamed according to the common naming scheme.

Refs. #3311, needed for #3315.

Change-Id: I2a9f1d932f142d645df75901521a734d208de509

Revision 345378d4 (diff)
Added by Artem Zhmurov 7 months ago

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

Revision 84e5a0e6 (diff)
Added by Artem Zhmurov 7 months ago

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.

Refs. #3315, #3311.

Change-Id: I5ba0f530918f3340fa1a5ad3e8d60fe4e0967dab

Revision 6975fbfd (diff)
Added by Artem Zhmurov 7 months ago

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 9 months ago

  • Tracker changed from Feature to Task
  • Assignee set to Artem Zhmurov
  • Target version set to 2021

#2 Updated by Artem Zhmurov 9 months ago

  • Status changed from New to Accepted

#3 Updated by Artem Zhmurov 9 months ago

  • Target version changed from 2021 to 2021-refactoring

#4 Updated by Artem Zhmurov 9 months ago

  • Description updated (diff)

#5 Updated by Artem Zhmurov 9 months ago

  • Status changed from Accepted to In Progress

#6 Updated by Artem Zhmurov 9 months ago

  • Description updated (diff)

#7 Updated by Artem Zhmurov 7 months ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF