Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AMD equivalent to NvOptimusEnablement

Tags:

gpu

For Intel+NVIDIA dual-GPU "Optimus" setups, an application can export NvOptimusEnablement as explained in OptimusRenderingPolicies.pdf. This option allows an application to ensure the use of the high-speed discrete GPU without needing profile updates or user interaction, which is usually desired for certain classes of applictions.

Is there an equivalent trick for systems with AMD GPUs (Windows-only is fine), and if so, what is it? I have not been able to find any concrete information via Googling; only a lot of people asking the same question on various forums with no answers, or SO articles on the NVIDIA trick with a "maybe AMD has something similar, I don't know" comment.

like image 741
Sean Middleditch Avatar asked Jul 03 '13 21:07

Sean Middleditch


2 Answers

According to https://community.amd.com/thread/169965

extern "C" { __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; }

This will select the high performance GPU as long as no profile exists that assigns the application to another GPU.

Please make sure to use a 13.35 or newer driver. Older drivers do not support this.

like image 136
Bob Smith Avatar answered Nov 06 '22 21:11

Bob Smith


This code will be ignored when you compile on non-windows machines:

#ifdef _WIN32
#include <windows.h>
extern "C" __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
extern "C" __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
#endif
like image 38
8Observer8 Avatar answered Nov 06 '22 22:11

8Observer8