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

[WIP] Device tasks with coroutines #253

Merged
merged 83 commits into from
Feb 27, 2024

Conversation

devreal
Copy link
Contributor

@devreal devreal commented Apr 12, 2023

An early implementation of device tasks with coroutines, still WIP. Single-process runs should work, distributed runs need a patch in PaRSEC. Implemented only in the PaRSEC backend. See included unit tests for usage examples.

@devreal devreal marked this pull request as draft April 12, 2023 15:58
@evaleev evaleev force-pushed the ttg-device-support-master-coro branch from cf9ed17 to 9bad08b Compare April 20, 2023 19:27
@devreal devreal force-pushed the ttg-device-support-master-coro branch from db6be87 to 91e13e8 Compare June 9, 2023 17:41
devreal and others added 27 commits July 6, 2023 16:18
Signed-off-by: Joseph Schuchart <[email protected]>
The views on the device will be handled by the backend, not in ttg::make_view

Signed-off-by: Joseph Schuchart <[email protected]>
[ttg|std]::span is not a good fit because it carries a size template
argument that we don't care about but makes handling more difficult.
Plus, we need to encode the scope for each span.

Three scopes are available:
1) SyncIn: copy host data to device before invoking the kernel callable.
2) SyncOut: copy the device data back to the host before invoking the output callable.
3) Allocate: allocate but do not synchronize in or out.

Both SyncIn and SyncOut will allocate sufficient memory on the device.

Signed-off-by: Joseph Schuchart <[email protected]>
- TTG_HAVE_CUDA enables CUDA support: synchronizing the stream between
  the kernel call and the output call.
- TTG_USE_CUDA_PREFETCH enables support for prefetching based on the view scope.

Signed-off-by: Joseph Schuchart <[email protected]>
devreal and others added 27 commits July 6, 2023 16:18
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
… the key in the profiling info under the parsec driver
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
@devreal devreal force-pushed the ttg-device-support-master-coro branch from e0735a7 to 8362742 Compare July 6, 2023 20:20
@evaleev evaleev merged commit 8362742 into TESSEorg:master Feb 27, 2024
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.

3 participants