Get Supported Devices on Windows#

On Windows, the NvAFX_GetSupportedDevices() function can be used to determine the GPUs supported by the currently selected model. This function is not supported for chained effects.

Note

This method must be called after you set the model path.

This function should be called with the following parameters:

  • The effect handle.

  • The size of the input array. If the call succeeds, this value is set by the function.

  • Array of size num.

The function fills the array with the CUDA device indices of devices that are supported by the model, in descending order of preference. (The first device is the most preferred device.)

The following example fetches the list of supported GPUs by the model:

int numSupportedDevices = 0;
NvAFX_GetSupportedDevices(handle, &numSupportedDevices, nullptr);
std::vector<int> ret(num);
NvAFX_GetSupportedDevices(handle, &numSupportedDevices, ret.data);