- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When using write and discard_write accessors with the CUDA backend a Host to Device copy is made. Even though this is supposed to be write only which does not need such an action and this is wasted resources.
queue.submit([&] (cl::sycl::handler& cgh) {
auto input_acc = input.get_accesssycl::access::mode::read(cgh);
auto output_acc = output.get_accesssycl::access::mode::discard_write(cgh);
auto maxRange = sycl::nd_range<2>(sycl::range<2>{height, width / 4}, sycl::range<2>(1, 128));
cgh.parallel_for(maxRange, [=](sycl::nd_item<2> item){
output_acc[item.get_global_id()] = 0;
});
});
Am I doing something wrong or is this a quirk of the current implementation of the SYCL specification?
I have never written an issue like this before so if you need additional information just ask.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Do you mind sharing your complete source file so as to get a better clarity with respect to your claim?
In general, accessor::read mode is where the copy happens from host to device. Buffers just claim the memory space. Whereas, the actual copy happens when accessors are called.
I would like to see the buffers which you have declared in your program.
Thanks,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I already got an answer to my question here https://github.com/intel/llvm/issues/1992
thanks for your time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Just a quick reminder to share your complete source code.
Thanks,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for providing the link. Good to know that your query got addressed.
Let me know if I can close the thread.
Thanks,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel will no longer monitor this thread. However, this thread will remain open for community discussion. If you still have any issue, feel free to post a new question.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page