[all-commits] [llvm/llvm-project] 381cc4: [OpenMP] Implicitly include the 'cgpu' and 'mgpu' ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Sep 27 14:19:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 381cc48a8e03e271e56cf3b97384c9077c3b214c
      https://github.com/llvm/llvm-project/commit/381cc48a8e03e271e56cf3b97384c9077c3b214c
  Author: Joseph Huber <35342157+jhuber6 at users.noreply.github.com>
  Date:   2023-09-27 (Wed, 27 Sep 2023)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/test/Driver/openmp-offload-gpu.c

  Log Message:
  -----------
  [OpenMP] Implicitly include the 'cgpu' and 'mgpu' libraries for OpenMP (#67557)

Summary:
[The LLVM C library for GPUs](https://libc.llvm.org/gpu/) supports
standard function calls on the GPU that users are familiar with.
Currently, this requires that users include these manually. The support
for this library is dependent upon whether or not associated LLVM build
was built with the GPU C library support. This patch implicitly adds
these for an OpenMP offloading compilation if we find that the toolchain
contains the GPU declarations that allow us to use this.

I do not know how to test this, given that it requires information from
the resource directory in the install. That means it won't be present
for any internal tests. It works when I test it and the idea is simple
enough so it should be simple enough.




More information about the All-commits mailing list