-
Notifications
You must be signed in to change notification settings - Fork 117
Remove vector content from coalesced slides #419
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
base: main
Are you sure you want to change the base?
Conversation
The slides on "Coalesced Global Memory" have 3 slides of content at the end on vectors, 2 of which are duplicates of content in the following "Vectors" lesson. See slides 10 & 11 in vectors lesson. This PR removes those slides from the coalesced lesson, and adds the non-duplicate slide "Vector Types" to the vector lesson. As well as updating a couple of typos in the "Vectors" lesson.
Lesson_Materials/Vectors/index.html
Outdated
| <div class="container"> | ||
| <code class="code-100pc"><pre> | ||
| sycl::int2 | ||
| sycl::int3 (N.B sizeof(int3) == sizeof(int4)) |
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.
Nitpick: Is it actually guaranteed that sizeof(int3) == sizeof(int4)? As far as I know, the SYCL spec only says that the alignment must be the same. I agree that in many cases sizes will also be the same due to padding, but I'm not sure if the C++ standard guarantees this (?)
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.
Thanks for the comment, there was also a bullet in a previous slide which said this. I don't think we need to say something that may be controversial if we can avoid it. So I've removed this parenthesis note in the code snippet and moved the bullet point from the previous slide here but alignment say alignment
Digging in the spec for more references to this, https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#memory-layout-and-alignment is indeed all about alignment. vec::byte_size() has some wording about size, but I don't think it's fair to infer about a sizeof() C++ operator from that.
| * Vectors can be made from all char, integer or floating point types. | ||
| * Using vector types: | ||
| * Can make code more readable. | ||
| * Can give better memory access patterns. |
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.
Maybe we should mention: contrary to its name, it does not guarantee vectorization, and SYCL will implementations will typically implement vec in non-vectorized fashion because often vectorization already is done across work items?
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.
That's an interesting point, there's an earlier slide on "Horizontal vs vertical vectorization" which touches more on this kind of relationship, i've added a bullet point on this in there
The slides on "Coalesced Global Memory" have 3 slides of content at the end on vectors, 2 of which are duplicates of content in the following "Vectors" lesson (see slides 10 & 11 in vectors lesson)
This PR removes those slides from the coalesced lesson, as it's out of scope, and adds the non-duplicate slide "Vector Types" to the vector lesson. As well as updating a couple of typos in the "Vectors" lesson.