Changes between Version 8 and Version 9 of Notes_on_CUDA_Semantics


Ignore:
Timestamp:
07/02/14 12:31:26 (12 years ago)
Author:
andrevm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Notes_on_CUDA_Semantics

    v8 v9  
    250250Vector types (including `dim3`) should be able to be represented with a struct with members `x`, `y`, `z`, and `w`.
    251251
     252=== Streams and Events ===
     253
     254A Cuda stream is represented as a queue of kernel instances. When a kernel is launched on a stream, a kernel instance is push onto the back of the queue, and will block until reaching the front of the queue, at which point it can begin executing. The null stream, however, must be treated differently. The null stream is the default stream and it has different semantics. Kernels enqueued on the default stream cannot be executed concurrently with any other kernels, so all kernels before a kernel in the null stream must finish before it can execute, and all kernels after a kernel in the null stream must block until it is finished. All non-null streams will be stored in a list in a _cudaContext struct. Additionally, the null stream is stored separately in a Cuda context because of its special semantics.
     255
     256Cuda events are a way to save a reference to a particular point in a Cuda stream. This allows events to be compared to perform timing measurements on certain actions, but more importantly, allows the programmer an additional way to synchronize streams with each and the host. Events are represented as a reference to the last kernel instance that must complete before the event is said to have occurred.
     257
     258A kernel instance is a struct containing the $proc that is the kernel itself and a flag indicating whether the kernel is blocked and waiting to execute, executing, or finished executing.
     259
    252260== Other Resources ==
    253261