Improve AMDGPU sqrt and inverse sqrt handling for bfloat
Open
backend:AMDGPU
missed-optimization
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The code for targets without v_sqrt_bf16 and v_rsq_bf16 is quite poor: https://github.com/llvm/llvm-project/pull/172044
This looks like it is casting to float, and performing the full precision float expansion. This can use one of the faster options, and be closer to the f16 expansion.
Contributor guide
Research direction
Start with the linked pull request and the handling for targets without v_sqrt_bf16 and v_rsq_bf16. Compare the bfloat expansion with the existing f16 expansion and identify the faster options used there. Done means the generated handling is more efficient and closer to the f16 expansion.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100