[all-commits] [llvm/llvm-project] a6f53a: [MLIR][GPU] Link in device libraries during HSA co...
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Fri Nov 19 14:29:51 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a6f53afbcb4d995139064276b5ad971ad7ced5e2
https://github.com/llvm/llvm-project/commit/a6f53afbcb4d995139064276b5ad971ad7ced5e2
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2021-11-19 (Fri, 19 Nov 2021)
Changed paths:
M mlir/lib/Dialect/GPU/CMakeLists.txt
M mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list