[PATCH] D112639: [openmp][amdgpu] Add comment warning that libm may be broken

Jon Chesterfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 27 11:01:45 PDT 2021


JonChesterfield added a reviewer: ronlieb.
JonChesterfield added a comment.

Using phab as a bug tracker here, but am also happy to check in that comment as-is if someone hits the green button.

The problem is that rocm device-libs doesn't have architecture specific attributes set because it uses one IR file for multiple GPU architectures. This relies on -mlink-builtin-bitcode setting appropriate attributes for the target presently being compiled when the files are pulled in.

Since we're passing the device libs at link time (to fit the '-lm' link time mode, and so we don't have N copies of the same code in every application) we can't use mlink-builtin-bitcode and presently use llvm-link.

That means we splice in bitcode that doesn't have the right attributes set, and our backend assumes that the correct attributes will be set. Outlined a few workarounds in the comment, not personally certain which way to go here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112639/new/

https://reviews.llvm.org/D112639



More information about the cfe-commits mailing list