HOME
| OPENMP API Specification: "Version 5.2 -- GIT rev 95b2e3a44"

13.4  Device Initialization

Execution Model Events

The device-initialize event occurs in a thread that begins initialization of OpenMP on the device, after the device’s OpenMP initialization, which may include device-side tool initialization, completes. The device-load event for a code block for a target device occurs in some thread before any thread executes code from that code block on that target device. The device-unload event for a target device occurs in some thread whenever a code block is unloaded from the device. The device-finalize event for a target device that has been initialized occurs in some thread before an OpenMP implementation shuts down.

Tool Callbacks

A thread dispatches a registered ompt_callback_device_initialize callback for each occurrence of a device-initialize event in that thread. This callback has type signature ompt_callback_device_initialize_t.

A thread dispatches a registered ompt_callback_device_load callback for each occurrence of a device-load event in that thread. This callback has type signature ompt_callback_device_load_t.

A thread dispatches a registered ompt_callback_device_unload callback for each occurrence of a device-unload event in that thread. This callback has type signature ompt_callback_device_unload_t.

A thread dispatches a registered ompt_callback_device_finalize callback for each occurrence of a device-finalize event in that thread. This callback has type signature ompt_callback_device_finalize_t.

Restrictions

Restrictions to OpenMP device initialization are as follows:

Cross References