-
Notifications
You must be signed in to change notification settings - Fork 8
ENH,BUG: Bind data directly for row group ranges #122
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
Conversation
This avoids one unnecssary copy, but also avoids `get_physical_array()` in general, which appears to be a pattern that is not ideal typically (and specifically with streaming). Signed-off-by: Sebastian Berg <[email protected]>
db5ea0b
to
569cc47
Compare
@reazulhoque did this work out? Would be nice to confirm it's right, although, so long we trust the trick with the shared pointer keep alive in the closure, I think this is an improvement either way. |
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.
Code for creating the row_group_ranges logical array is a bit odd but its fine. Maybe you can make the vector backing the external allocation const or something to make it safer.
.write_accessor<legate::Rect<1>, 1, false>() | ||
.ptr(0); | ||
std::copy(row_group_ranges.begin(), row_group_ranges.end(), ptr); | ||
auto alloc = legate::ExternalAllocation::create_sysmem( |
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 a bit weird. Normally wouldn't you write to a store inside the task? I think its even ok now to write to a broadcast store.
Also if I did row_group_ranges->push_back() in a later part of the code, the vector could resize and delete the allocation used in ExteranAllocation.
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.
Good, point, will at least try and make it const.
Normally wouldn't you write to a store inside the task
Yeah, I think this should be refactored to a small task (ideally one worker per file maybe). This is more of a hot-fix to help the streaming, and for those tasks, it would be nice to use unbound results, but that would just break the streaming again right now...
@seberg unfortunately it seems like to make this work we'll need to force the submit of previous tasks as well. |
Superseded by other PR. |
This avoids one unnecssary copy, but also avoids
get_physical_array()
in general, which appears to be a pattern that is not ideal typically (and specifically with streaming).