-
Notifications
You must be signed in to change notification settings - Fork 126
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
Bug fixes for GPU-aware Put and Get #3090
Conversation
@@ -1248,7 +1251,8 @@ void BP5Deserializer::FinalizeGets(std::vector<ReadRequest> Requests) | |||
|
|||
helper::NdCopy(IncomingData, inStart, inCount, true, true, | |||
(char *)Req.Data, outStart, outCount, true, | |||
true, ElementSize); | |||
true, ElementSize, Dims(), Dims(), Dims(), | |||
Dims(), false, Req.MemSpace); | |||
} |
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.
@eisenhauer This is the only part I don't like from my fix (having to spell out the default arguments), but I honestly didn't know how to make it better without breaking other parts of the code.
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.
@anagainaru If you want to avoid this, add MemSpace in the argument list after ElementSize rather than at the end. (ElementSize is itself a new argument, introduced a few weeks ago when NdCopy got un-templated. (The only way that templates were employed was in "sizeof(T)" and it was judged not worth having a dozen instances of the same code that differed only in that one constant, so ElementSize was made a parameter and the templating removed. But yes, the default args meant that the new parameter was best introduced before all the args with default values...)
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.
@anagainaru If you want to avoid this, add MemSpace in the argument list after ElementSize rather than at the end. (ElementSize is itself a new argument, introduced a few weeks ago when NdCopy got un-templated. (The only way that templates were employed was in "sizeof(T)" and it was judged not worth having a dozen instances of the same code that differed only in that one constant, so ElementSize was made a parameter and the templating removed. But yes, the default args meant that the new parameter was best introduced before all the args with default values...)
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.
Why not move MemSpace up to the first optional parameter? Or simply make it a compulsory parameter? Even the current looking is fine. I don't see a big problem. The ultimate goal is probably to support memory selections under all circumstances anyway, in which case the empty Dims parameters will have to be replaced with something meaningful.
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.
Ok I'll leave it like this for now and will figure out a better solution when we add more backends
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.
Other than the suggestion about relocating the MemSpace parameter, this looks good...
Later edit: I think your suggestion is good, I will try it |
Bug fixes for GPU-aware Put and Get
Bug fixes include:
NdCopy
function that broke the Get code for the BP5 engine (removed all the unused functions)Detect
when CUDA is enabled and fixed the bugs caused by this