Hello Community,
We would like to propose a per-device configuration which will be used during AMDGPUDeviceTy construction for selecting the device-specific default values.
Motivation
The AMDGPU plugin currently uses one default value for each runtime option. However, the best default can differ between GPU architectures. The runtime should select appropriate defaults for each GPU so users need environment variables only when they explicitly want to override those defaults.
Our downstream implementation already maintains per-device defaults for runtime optimizations. Moving this logic upstream would reduce downstream divergence and lower the associated maintenance cost.
Upstreaming this feature would provide:
- Better defaults for each architecture.
- Unchanged user control through environment variables.
- One place for hardware-specific runtime configuration.
- Less downstream code and fewer merge conflicts.
Proposed behavior
During device construction, the plugin would:
- Query device properties.
- Select a device configuration.
- Apply its values only when the user did not set the corresponding environment variable.
Initial scope
We plan to first onboard the configure for LIBOMPTARGET_AMDGPU_USE_MULTIPLE_SDMA_ENGINES
- The upstream plugin already supports this option and its implementation.
- Explicit environment settings retain their current behavior.
- Unknown devices retain conservative defaults.
- No environment variable is removed or renamed.
Other defaults that downstream currently maintains should remain outside the scope of the initial patch. Once the dependent components are upstream, these defaults can use the same configuration feature.
Thanks in advance for your suggestions.