hipinitdevice Interface Reference#
hipfort::hipinitdevice Interface Reference
Initialize the specified device to be used for GPU executions. More...
Public Member Functions | |
| integer(c_int) function | hipinitdevice_ (device, deviceflags, flags) |
Detailed Description
Initialize the specified device to be used for GPU executions.
- Parameters
-
[in] device Ordinal of the device to initialize. [in] deviceFlags Scheduling/context flags to apply to the device. Uses the same values as hipSetDeviceFlags (e.g. hipDeviceScheduleSpin,hipDeviceScheduleYield,hipDeviceScheduleBlockingSync,hipDeviceScheduleAuto). Only honored whenflagsishipInitDeviceFlagsAreValid.[in] flags Must be either 0 or hipInitDeviceFlagsAreValid. WhenhipInitDeviceFlagsAreValid,deviceFlagsare applied to the device; when 0,deviceFlagsare ignored.
Initializes the runtime state for the requested device. Unlike hipSetDevice, this API does NOT make the device current for the calling thread. On the ROCm platform the primary context of every device is created eagerly during runtime initialization, so this call mainly validates the device, applies the requested flags, and ensures the device's default stream is created.
- Returns
hipSuccess,hipErrorNoDevice,hipErrorInvalidDevice,hipErrorInvalidValue
- See also
- hipSetDevice, hipSetDeviceFlags
Member Function/Subroutine Documentation
◆ hipinitdevice_()
| integer(c_int) function hipfort::hipinitdevice::hipinitdevice_ | ( | integer(c_int), value | device, |
| integer(c_int), value | deviceflags, | ||
| integer(c_int), value | flags | ||
| ) |
The documentation for this interface was generated from the following file: