commit | 64e73e8356392f7d4c6c8a499432479bebd46df6 | [log] [tgz] |
---|---|---|
author | Krzysztof Drewniak <Krzysztof.Drewniak@amd.com> | Thu Nov 18 22:37:53 2021 +0000 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Nov 19 14:31:32 2021 -0800 |
tree | 28cdc9e9c78955ae25e4da18e13b8f321a0b0962 | |
parent | a59450141256e78248dc469d7c996ba983108966 [diff] |
[MLIR][GPU] Link in device libraries during HSA compilation if needed To perform some operations, such as sin() or printf(), code compiled for AMD GPUs must be linked to a series of device libraries. This commit adds support for linking in these libraries. However, since these device libraries are delivered as LLVM bitcode, raising the possibility of version incompatibilities, this commit only links in libraries when the functions from those libraries are called by the code being compiled. This code also sets the math flags to their most conservative values, as MLIR doesn't have a `-ffast-math` equivalent. Depends on D114114 Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D114117 GitOrigin-RevId: a6f53afbcb4d995139064276b5ad971ad7ced5e2
See https://mlir.llvm.org/ for more information.