-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL][DOC] USM Proposal Update #395
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
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.
Great improvement!
}; | ||
|
||
class queue { | ||
... | ||
public: | ||
... | ||
event sycl_memset(void* ptr, int value, size_t count); | ||
event memset(void* ptr, int value, size_t count); |
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.
fill
?
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 needs to be contiguous byte-based like std::memset.
Iterators don't have that requirement, right?
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.
void *
is not an iterator anyway.
But of course if you prefer you can use memset
.
[source,cpp] | ||
---- | ||
class handler { | ||
... | ||
public: | ||
... | ||
event sycl_memset(void* ptr, int value, size_t count); | ||
event memset(void* ptr, int value, size_t count); |
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.
fill
like std::fill
?
[source,cpp] | ||
---- | ||
class handler { | ||
... | ||
public: | ||
... | ||
event sycl_memcpy(void* dest, const void* src, size_t count); | ||
event memcpy(void* dest, const void* src, size_t count); |
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.
copy_n
like std::copy_n
?
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 needs to be contiguous byte copy like std::memcpy.
Iterators don't have that requirement, right?
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.
Also, I don't like adding a flavor of handler::copy for this, b/c those are based on objects that have their size baked in, hence good ol' std::memcpy style operations.
Note - we can't use std::memcpy with device pointers b/c we need to handle them specially.
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.
As you want.
This was just to propose some C++-like naming.
But C-like naming is fine.
In both case anyway it not exactly the same as either the C or C++ equivalent.
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.
Yep. The good news is that for shared/host allocations, regular std::fill/copy_n should work!
}; | ||
|
||
class queue { | ||
... | ||
public: | ||
... | ||
event sycl_memcpy(void* dest, const void* src, size_t count); | ||
event memcpy(void* dest, const void* src, size_t count); |
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.
copy_n
like std::copy_n
? And if so, adapting the order of the arguments...
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.
LGTM.
One comment.
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.
@keryell, does it look good to you?
http://ec2-52-15-243-124.us-east-2.compute.amazonaws.com:8010/#/builders/18/builds/16 @jbrodman, could you merge |
Done. |
okay. It didn't help. |
Hi Alexey, Vladimir has already merged the code for windows build in the PR: #463 You can update your code to make win-x64-pr pass |
@DoyleLi, could you clarify what do you mean by "update your code"? |
I mean you can update the files under the folder "buildbot" in your own branch from "#463": buildbot/compile.py |
Signed-off-by: James Brodman <[email protected]>
Signed-off-by: James Brodman <[email protected]>
Signed-off-by: James Brodman <[email protected]>
Updated. |
Rev proposal based on feedback.