Skip to content

[HIP] -fmath-errno causes undefined symbol expf #105776

@yxsamliu

Description

@yxsamliu

https://godbolt.org/z/nTfccd1Tr

after 5f1d383

currently HIP expf function is implemented as __builtin_expf. When -fmath-errno is specified, __builtin_expf is emitted as a call of external lib function expf by clang codegen. Since ROCm device libs does not implement expf. This results in undefined symbol.

Before 5f1d383, HIP expf function is implemented by __ocml_exp_f32, therefore did not have such issue.

I kind of think it is not good to go back to __ocml_exp_f32 since it does not handle errno any way. I think probably we should just do not pass -fmath-errno to clang -cc1 for amdgpu since we do not support it.

@arsenm @b-sumner

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions