What does the "synchronization policy" mean when launching a kernel?

68 Views Asked by At

Starting with CUDA 12.0, one can specify a wider variety of "launch attributes", when launching a kernel, using a CUlaunchConfig structure; and one of the attributes we can place in a launch config structure is a "synchronization policy".

Now, CUDA streams have had synchronization policies for a long time. That policy can be "auto", "spin", "yield", "block" (which you can read about in the documentation, and are not extremely well described, but never mind). But - how do these apply to a kernel launch?


see this related question regarding another mysterious field of the kernel launch config structure.

1

There are 1 best solutions below

3
Anis Ladram On

As mentioned on this section of the CUDA driver API, the CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY attribute is not valid for launches:

Valid for streams. See CUlaunchAttributeValue::syncPolicy.