Cooperative Kernels#

Warning

Experimental features:

  • May be replaced, updated, or removed at any time.

  • Do not require maintaining API/ABI stability of their own additions over time.

  • Do not require conformance testing of their own additions.

Motivation#

Cooperative kernels are kernels that use cross-workgroup synchronization features. All enqueued workgroups must run concurrently for cooperative kernels to execute without hanging. This experimental feature provides an API for querying the maximum number of workgroups and launching cooperative kernels.

Any device can support cooperative kernels by restricting the maximum number of workgroups to 1. Devices that support cross-workgroup synchronization can specify a larger maximum for a given cooperative kernel.

The functions defined here align with those specified in Level Zero.

Changelog#

Revision

Changes

1.0

Initial Draft

1.1

Switch from extension string macro to device info enum for reporting support.

Support#

Adapters which support this experimental feature must return true when queried for UR_DEVICE_INFO_COOPERATIVE_KERNEL_SUPPORT_EXP via urDeviceGetInfo. Conversely, before using any of the functionality defined in this experimental feature the user must use the device query to determine if the adapter supports this feature.

Contributors#