Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to get nvapi gpu connected to nvidia gpu?


Asked by Malani Howard on Dec 04, 2021 FAQ



NVAPI_INTERFACE NvAPI_GPU_GetAllOutputs (NvPhysicalGpuHandle hPhysicalGpu __nvapi_deprecated_function ("Do not use this function - it is deprecated in release 290. Instead, use NvAPI_GPU_GetConnectedDisplayIds.") NVAPI_INTERFACE NvAPI_GPU_GetConnectedOutputs (NvPhysicalGpuHandle hPhysicalGpu
Thereof,
Strangely enough, NVAPI has no functions to get GPU usage/load. It turns out that there are some secret functions in nvapi.dll. You can use QueryInterface function to retrieve them by specifying the memory address of the function.
Subsequently, The array nvGPUHandle will be filled with physical GPU handle values. The returned gpuCount determines how many entries in the array are valid. If the display corresponds to more than one physical GPU, the first GPU returned is the one with the attached active output.
Moreover,
There are currently 4 domains for which GPU utilization and dynamic P-State thresholds can be retrieved: graphic engine (GPU), frame buffer (FB), video engine (VID), and bus interface (BUS). DESCRIPTION: This API retrieves all performance states (P-States) 2.0 information.
In this manner,
Do this by opening the Intel graphics control panel. It should be in the system tray or right-click on the desktop. If you want to go back to using the Nvidia GPU, then manually switch your laptop to Dedicated Nvidia GPU mode. Below this section, there is a list of Hardware ID strings.