Update slide wording on USM blocking behavior - #415
Conversation
This PR proposed changes to the "Using_USM" slides on the blocking behavior of USM malloc and free. Currently the slides say that `malloc_device` and `free` are blocking, however I feel that terminology could be misleading as with the `queue` parameter it implies the entry-points are asynchronous, which they are not. I think it is more informative to tell a beginner that the entry-points are synchronous with the queue used as a shortcut to context and device. For `sycl::free` additionally belive the following bullet points were incorrect: * "This is a blocking operation.", we explicitly added a note in KhronosGroup/SYCL-Docs#758 saying it could be blocking or non-blocking. * "The `queue` must be the same as was used to allocate the memory.", I don't see this wording anywhere in the spec and not sure how it would be enforceable given a USM allocation can be made using an entry-point taking a device and context rather than a queue
That's true, however AFAIR "blocking" there refers to device work -- not to the host.
You're right. The correct statement would be that it "must use the same context that was used to allocate the memory". I could imagine that this was simplified for teaching reasons. If I recall, we kind of tried to avoid focusing too much on I'm not opposed to your change, but would perhaps suggest that we first survey the material for how/to which extent we introduce context in the materials before this lesson, unless you already have done so? |
Thanks for your thoughts. I've looked into where the repo uses the word "blocking" and it's only in these slides and one other place to describe a particular I pushed a commit to drop the "It is unspecified whether Regarding contexts, Lesson 13 on multiple devices is introduces the concept of contexts in a reasonable amount of detail, so I added a reference to that lesson to try deffer attention on contents in this slide. |
illuhad
left a comment
There was a problem hiding this comment.
Just requesting changes so that we don't forget that the WG made suggestions before merging.
This PR proposed changes to the "Using_USM" slides on the blocking behavior of USM
mallocandfree, and "Fast Track" identical slides.Currently the slides say that
malloc_deviceandfreeare blocking, however I feel that terminology could be misleading to beginners as with thequeueparameter it implies the entry-points could be asynchronous, which they are not. I think it is more informative to say that the entry-points are synchronous which is terminology used in the other lessonsFor
sycl::freein particular I believe the following bullet points were incorrect for the following reasons:sycl::freeSYCL-Docs#758 saying it could be blocking or non-blocking.queuemust be the same as was used to allocate the memory.", I don't see this wording anywhere in the spec and not sure if it would be enforceable given a USM allocation can be made using amallocentry-point taking a device and context rather than a queue