[gsoc2024][libc][math][c23] Implement _Float16 higher math functions
This issue is part of the following Google Summer of Code 2024 project: https://summerofcode.withgoogle.com/programs/2024/projects/1vPVUj93.
- [x]
acosf16: #127731 - [x]
acoshf16: #130588 - [X]
acospif16: #134664 - [X]
asinf16: #124212 - [x]
asinhf16: #131351 - [x]
asinpif16: #132210 - [x]
atanf16: #130947 - [ ]
atan2f16: #180969 - [ ]
atan2pif16: #133739 - [x]
atanhf16: #132612 - [x]
atanpif16: #132212 - [ ]
cbrtf16: #132484 - [ ]
compoundnf16 - [x]
cosf16: #118785 - [x]
coshf16: #105947 - [x]
cospif16: #113001 - [ ]
erff16: #133112 - [ ]
erfcf16: #180927 - [x]
expf16: #100632 - [x]
exp10f16: #101588 - [x]
exp10m1f16: #105706 - [x]
exp2f16: #101217 - [x]
exp2m1f16: #105690 - [x]
expm1f16: #102387 - [x]
fmaf16: #130757 - [x]
f16sqrt(extension): #96642 - [x]
f16sqrtf(extension): #95251 - [x]
f16sqrtl(extension): #96642 - [x]
f16sqrtf128: #96642 - [x]
hypotf16: #131991 - [ ]
lgammaf16 - [x]
logf16: #106072 - [x]
log10f16: #106091 - [ ]
log10p1f16: #133202 - [ ]
log1pf16 - [x]
log2f16: #106084 - [ ]
log2p1f16 - [ ]
logp1f16 - [ ]
powf16: #132198 - [ ]
pownf16 - [ ]
powrf16 - [ ]
rootnf16 - [x]
rsqrtf16: #132818 - [x]
sinf16: #116674 - [ ]
sincosf16(extension) - [x]
sinhf16: #105947 - [x]
sinpif16: #110994 - [x]
sqrtf16: #112406 - [x]
tanf16: #121018 - [x]
tanhf16: #106006 - [x]
tanpif16: #115183 - [ ]
tgammaf16
Are there any plans for LLVM to lower to these intrinsics, or does it already ever? Or is this just making the functions available for calling directly.
Are there any plans for LLVM to lower to these intrinsics, or does it already ever? Or is this just making the functions available for calling directly.
Sorry for the late reply. I have been told there are plans to at some point have LLVM call LLVM libc math functions for computations internally, and later have LLVM lower to calls to these functions too.
Lowering to these functions may be nice since it provides a way to get correctly rounded f16 results without correctly rounded f32 results (likely meaning performance wins on platforms where hardware f64 is slower than f32 or unavailable) but it does add some complexity. If this is done, I would appreciate the ability for frontends to specify which f16 symbols are available so it is possible to provide only a subset. For example, the frontend could configure that only sinf16, cosf16, and tanf16 are available and LLVM should use those where possible, but all other math operations will still lower to f32 versions with conversions.
I noticed that some of the functions were not implemented and I would like to ask if people are still needed to implement them.
I noticed that some of the functions were not implemented and I would like to ask if people are still needed to implement them.
Help is always welcome, but I'm not sure which functions to recommend you work on.
I noticed that some of the functions were not implemented and I would like to ask if people are still needed to implement them.
Help is always welcome, but I'm not sure which functions to recommend you work on.
I can work on implementing atanf16. Could you assign this to me? Thanks!
Could you leave a comment on #130947? It looks like I can't assign you to it otherwise.
@overmighty I believe asinf16 should be checked as it has been done here https://github.com/llvm/llvm-project/pull/124212
Additionally, I'd like to work on asinhf16.
@overmighty I believe
asinf16should be checked as it has been done here #124212
Correct.
Additionally, I'd like to work on
asinhf16.
Please leave a comment on https://github.com/llvm/llvm-project/issues/131001 so that I can assign you to it.
@overmighty I just noticed that dsqrtf16 and fsqrtf16 are in this list. They should be removed because they are supposed to have narrower output types.
Right, fixed.
Hey @overmighty , I would like to try powf16, could i ?
Hi! I'd like to try cbrtf16
Sure.
Hey @overmighty , I would like to try
powf16, could i ?
Please leave a comment on https://github.com/llvm/llvm-project/issues/132198 so that I can assign you to it.
Hi! I'd like to try
cbrtf16
Please leave a comment on https://github.com/llvm/llvm-project/issues/132199 so that I can assign you to it.
hi! @overmighty i'd like to work on erff16, please assign
hi! @overmighty i'd like to work on erff16, please assign
Please leave a comment on #133112.
Hi @overmighty, I want to work on atan2pif16, Can you open a issue and assign that to me? Thanks
Hi @overmighty, I want to work on
atan2pif16, Can you open a issue and assign that to me? Thanks
Sure, please leave a comment on https://github.com/llvm/llvm-project/issues/133739 so that GitHub lets me assign you to it.
Hi, I'd be interested to work on implementing atan2f16.
Cloud u please open a issue and assign to me? thanks~
Hi, I'd be interested to work on implementing
atan2f16. Cloud u please open a issue and assign to me? thanks~
Sure, please leave a comment on https://github.com/llvm/llvm-project/issues/180969 so I can assign you to it.