SWDEV-548892 - Stop using ocml exp10 functions#2226
Conversation
There was a problem hiding this comment.
Pull request overview
This PR replaces __ocml_exp10 function calls with the newer __builtin_elementwise_exp10 builtin for half-precision (__half, __half2) and bfloat16 (__hip_bfloat16) types, following the pattern previously established for exp and exp2 functions.
Key Changes:
- Replaced
__ocml_exp10_f16with__builtin_elementwise_exp10for__halftype - Replaced
__ocml_exp10_2f16with__builtin_elementwise_exp10for__half2type - Replaced
__ocml_exp10_f32with__builtin_elementwise_exp10for__hip_bfloat16type
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| projects/clr/hipamd/include/hip/amd_detail/amd_hip_fp16.h | Updated hexp10 and h2exp10 functions to use builtin exp10 implementation |
| projects/clr/hipamd/include/hip/amd_detail/amd_hip_bf16.h | Updated hexp10 function for bfloat16 to use builtin exp10 implementation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Given that the Note that currently, some of the HIP tests for Float16 accuracy are disabled. So this PR will probably still pass CI. |
bc13654 to
cb9b63a
Compare
Follow exp and exp2. I only separated exp10 just in case it breaks a build somewhere, since the elementwise exp10 builtin is much more recent than the others.
cb9b63a to
ec9b12a
Compare
I would expect new headers to not work with old compilers in the general case. We don't properly version anything, so we can't detect any cases like this. It's been over 3 months since the compiler patch now |
Follow exp and exp2. I only separated exp10 just in case it breaks a build somewhere, since the elementwise exp10 builtin is much more recent than the others.