Disable promote alloca to LDS when HIP-style dynamic LDS since the size
is unknown at compile time.
Change-Id: I13244a767cf172f63d2261bf6dd78ee8d2c21c44
Paths
| Differential D117494
AMDGPU: Account for usage HIP-style dynamic LDS ClosedPublic Authored by scchan on Jan 17 2022, 8:15 AM.
Details
Summary Disable promote alloca to LDS when HIP-style dynamic LDS since the size Change-Id: I13244a767cf172f63d2261bf6dd78ee8d2c21c44
Diff Detail
Event TimelineHerald added subscribers: foad, kerbowa, hiraditya and 8 others. · View Herald TranscriptJan 17 2022, 8:15 AM
Comment Actions This may cause some perf degradation. Do we know why promote alloca does not work for dynamic LDS? Is there a better way to handle this? Thanks. Comment Actions
We can't take LDS if the user may be using an unknown amount. The only way we could continue to do this is if we had an explicit optimization hint provided telling us either the max dynamic total size or allocation
This revision is now accepted and ready to land.Jan 19 2022, 7:15 AM Comment Actions I am OK for now. We may need keep an eye for the perf regression and be prepared to figure a way to alleviate that. Comment Actions
Right but there isn't an easy way. Either extending the language with a hint like Matt suggested or we have to clone the kernel and have the runtime to choose the one that fits at execution time. Closed by commit rG15f54dd5e496: AMDGPU: Account for usage HIP-style dynamic LDS (authored by yaxunl). · Explain WhyJan 19 2022, 10:06 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 401305 llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
llvm/test/CodeGen/AMDGPU/promote-alloca-to-lds-constantexpr-use.ll
|
The dynamic behavior is keyed on this being a 0 size allocation, not external linkage. Some of the graphics usage has external LDS with fixed, static sizes