[Openmp-commits] [PATCH] D102587: [OpenMP] Refine CMake code for libomptarget
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon May 17 07:01:20 PDT 2021
tianshilei1992 added a comment.
In D102587#2762882 <https://reviews.llvm.org/D102587#2762882>, @JonChesterfield wrote:
> I don't understand the control flow here. It looks like OPENMP_ENABLE_LIBOMPTARGET = ON, as before, but we now check for LLVM=12 on one path and not on another.
So `libomptarget` is still enabled by default, but it exits immediately if any check doesn’t pass. LLVM 12 here is just to make sure that APIs we’re using is the one we want. My system has LLVM 8. CMake can detect it and use it, but APIs have been changed so it cannot pass compilation.
> I think you sent an email suggesting we should test whether the compiler can actually build the plugin. LLVM==12 probably isn't a sufficiently robust way to do that.
Yes, my previous comment actually contains two points, one of which is about the test of compiler for deviceRTLs (which will be covered in another patches), and another one is this. I encountered issues when I just wanted to debug something wrong in `libomp`. So I just build OpenMP with GCC standalone.
> Can cmake handle passing a pre-made c++ file to the compiler to test if it can build? I'm thinking we could craft one that used variant, various intrinsics etc that are representative of the gpu code runtime.
Yes, that’s what I’m gonna do: write a tiny test case and check if the compiler can compile it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102587/new/
https://reviews.llvm.org/D102587
More information about the Openmp-commits
mailing list