[PATCH] D46992: [AMDGPU] Add perf hints to functions

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 22:46:04 PDT 2018


rampitec added a comment.

In https://reviews.llvm.org/D46992#1102499, @mareko wrote:

> How can UMDs disable this optimization?
>
> Are there cases where this decreases performance?


This is analysis. Optimization itself must be done in the runtime. OpenCL RT used to control it with the env. Graphics RT never did it. At any rate if you know your ideal occupancy it is better to set amdgpu-waves-per-eu attribute.

The only optimization implemented here based on the analysis is in the scheduler. On practice there is no way for a memory intensive program to benefit from an occupancy higher than 4, usually it is lower. However, the impact of the optimization is to let scheduler work where previously it just reverted the schedule if occupancy has decreased. Therefor the natural way to return the old behavior after this change is to disable scheduler (-enable-mished=0) which will result in the same code as before if this condition is triggered.


https://reviews.llvm.org/D46992





More information about the llvm-commits mailing list