Conversation
illuhad
left a comment
There was a problem hiding this comment.
LGTM!
Sidenote: AdaptiveCpp already implements this exact API; the only difference is that we don't have yet the khr_ prefix and the right feature test macro.
https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/doc/extensions.md#acpp_ext_prefetch_host
|
AdaptiveCpp implementation PR with interface as proposed here: AdaptiveCpp/AdaptiveCpp#1972 As a sidenote, I noticed that |
|
Yeah, I noticed that too. I didn't wanted to modify for this KHR but as a side note, in cuda they take a I guess oversight? (also should the function be const?) |
That makes more sense to me. Agree that for this PR it's probably out of scope.
I think none of the command submission functions are const. This I can understand, since from a C++ point of view, they modify the state of handler/queue objects. |
|
|
||
| int main() { | ||
| sycl::queue Q; | ||
| int *A = Q.malloc_shared<int>(1,Q); |
There was a problem hiding this comment.
There is no such member function to queue.
There was a problem hiding this comment.
I'm ashamed : ( Good catch!
| == Extensions to the handler class | ||
|
|
||
| This extension adds the following function to the [code]#sycl::handler# class. | ||
|
|
There was a problem hiding this comment.
I think we should show a high level synopsis here of the additions to the handler class like:
namespace sycl {
class handler {
void khr_prefetch_host(void* ptr, size_t numBytes);
// ...
};
}
This is consistent with the other KHR's that add member functions:
There was a problem hiding this comment.
I did it but then remove it due to
Can put it back if you prefer
There was a problem hiding this comment.
I think sycl_khr_queue_empty_query is the outlier. We should add the high level synopsis there too to make them all consistent.
| == Extensions to the queue class | ||
|
|
||
| This extension adds the following function to the [code]#sycl::queue# class. | ||
|
|
There was a problem hiding this comment.
Also here, add a high-level synopsis of the member functions added to queue.
|
2 Options:
We will ping some user so they can comment |
|
I would lean toward more granularity in extension and thus merge it. Which also will speedup its adoption (since its already available almost as is in AdaptiveCpp) |
|
As a SYCL user, I'm in favor of accepting this sooner than other larger extensions (that are in some sense more disruptive to the specification) since it is small and self contained. As others have mentioned, adding this to the specification will speed up adoption. |
|
For those who are asking for this KHR to move forward in order to speed up adoptions, which SYCL implementation(s) are you using? If this includes DPC++, then I wanted to explain my hesitancy. DPC++ currently provides a way to prefetch to host, but it has no effect when using the Level Zero backend because there is not yet support in Level Zero to do this prefetch. Therefore, I don't see a lot of value for DPC++ to implement a standalone "prefetch host" KHR in the short term because it would just be a no-op anyway on Level Zero. By the time we have Level Zero support, I expect that the WG will have approved #922, so I'd just as soon wait until then to have a prefetch-host KHR. |
|
@nscottnichols , @tdavidcl if you don't mind chiming in : ) Thanks! |
Replace old #280
Add
prefetch_hostwith the new format. The text and layout are based of theprefetchcode to keep consistency.