You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2021-04-11-hipsycl-091-buffer-policies.markdown
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,15 @@ This post is part of a series where we discuss some features of the brandnew hip
9
9
10
10
# Asynchronous buffers and explicit buffer policies
11
11
12
-
This is a new extension in hipSYCL that can make code using `sycl::buffer` objects **much clearer while also improving performance**. Insterested? Then this blog post is for you.
12
+
This is a new extension in hipSYCL that can make code using `sycl::buffer` objects **much clearer while also improving performance**. Interested? Then this blog post is for you.
13
13
14
14
## Motivation 1: Buffers are complicated
15
15
16
16
A `sycl::buffer` is a very complicated object. Depending on a combination of multiple factors the semantics of a `sycl::buffer` can be very different. Will it operate directly on input pointers or will it copy input data to some internal storage? Will it submit a writeback in the destructor to copy data back to host?
17
17
18
18
I have frequently noticed users getting this wrong. This can either lead to correctness issues, for example
19
19
* the buffer operates directly on the input pointer, while the user has only intended to provide it as a source of initial data and wanted to reuse it after buffer construction
20
-
*No writeback is issued even though the user expected data to be copied back to host.
20
+
*no writeback is issued even though the user expected data to be copied back to host.
21
21
22
22
Or performance bugs might be introduced - these are arguably even worse because you might not notice them right away and they might be difficult to find. Some performance bugs that I have seen in user code are:
23
23
* The buffer issued an unexpected writeback, and thus copied data back to host without the user intending it
0 commit comments