hipinitdevice Interface Reference

hipinitdevice Interface Reference#

hipFORT API Reference: hipfort::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]deviceOrdinal of the device to initialize.
[in]deviceFlagsScheduling/context flags to apply to the device. Uses the same values as hipSetDeviceFlags (e.g. hipDeviceScheduleSpin, hipDeviceScheduleYield, hipDeviceScheduleBlockingSync, hipDeviceScheduleAuto). Only honored when flags is hipInitDeviceFlagsAreValid.
[in]flagsMust be either 0 or hipInitDeviceFlagsAreValid. When hipInitDeviceFlagsAreValid, deviceFlags are applied to the device; when 0, deviceFlags are 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: