-
Notifications
You must be signed in to change notification settings - Fork 2
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
Ttg device support master coro - util/device.h #5
base: ttg-device-support-master-coro
Are you sure you want to change the base?
Ttg device support master coro - util/device.h #5
Conversation
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
# Conflicts: # examples/CMakeLists.txt
(cherry picked from commit 8147ac0)
Signed-off-by: Joseph Schuchart <[email protected]>
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]>
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]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
…ake outterm as an argument
…paration for suspendable tasks
This reverts commit 7dfe4ea.
Signed-off-by: Joseph Schuchart <[email protected]>
… the key in the profiling info under the parsec driver
…fine a core mask, not a core id
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
ttg/ttg/parsec/ttg.h
Outdated
} | ||
detail::ttg_devid[i] = -1; | ||
} | ||
detail::parsec_devid = new int[detail::nb_ttg_devices]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhh, this means we always have to call nb()
to get a valid pointer, before we can call allocate()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'm aware of that, that's why allocate()
and free()
(and other functions that rely on the conversion) always do check if( nb() >= ... )
as the first instruction before using detail::parsec_devid
... But maybe it's too circumvoluted...
There are alternatives... Let me know if you want to discuss this.
ttg/ttg/util/device.h
Outdated
@@ -0,0 +1,13 @@ | |||
#ifndef TTG_UTILS_DEVICE_H | |||
#define TTG_UTILS_DEVICE_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not util functionality, but provided to the user. Should be one level up. I think we should put all device-related functions and objects into the ttg::device::
namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me, I'll promote.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See e7fc769
Signed-off-by: Joseph Schuchart <[email protected]>
e7fc769
to
2a195f2
Compare
Refactor allocator API to be more object-oriented
2a195f2
to
7a08f07
Compare
Signed-off-by: Joseph Schuchart <[email protected]>
Refactor allocator API to be more object-oriented
db6be87
to
91e13e8
Compare
e0735a7
to
8362742
Compare
Add
util/device.h
and attg::device
namespace to expose the C-like allocator, and a few util functions.