Task #3316
Feature #3311: GPU infrastructure development
Feature #3313: Introduce and use opaque types for the DeviceStream and DeviceContext
Context and Stream manager
Description
Context and stream manager that will be able to take over the responsibility and ownership of all streams and context. Currently, streams are created and managed in the respective modules, which requires passing them over from one module to another (e.g. when H2D and D2H copies are issued). All the management should be taken over by a new object, simplifying the logic inside the respective modules.
Associated revisions
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 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
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.
Refs #3316
Refs #3311
Change-Id: I2c59b930ac266d89fafe9e0172b83f07e9858f0b