[all-commits] [llvm/llvm-project] 763c1f: [OpenMP] Drop the static library libomptarget-nvptx
Shilei Tian via All-commits
all-commits at lists.llvm.org
Thu Jan 14 10:34:44 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 763c1f9933463c40c39c04b68bbe4d296823b003
https://github.com/llvm/llvm-project/commit/763c1f9933463c40c39c04b68bbe4d296823b003
Author: Shilei Tian <tianshilei1992 at gmail.com>
Date: 2021-01-14 (Thu, 14 Jan 2021)
Changed paths:
M openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
Log Message:
-----------
[OpenMP] Drop the static library libomptarget-nvptx
For NVPTX target, OpenMP provides a static library `libomptarget-nvptx`
built by NVCC, and another bitcode `libomptarget-nvptx-sm_{$sm}.bc` generated by
Clang. When compiling an OpenMP program, the `.bc` file will be fed to `clang`
in the second run on the program that compiles the target part. Then the generated
PTX file will be fed to `ptxas` to generate the object file, and finally the driver
invokes `nvlink` to generate the binary, where the static library will be appened
to `nvlink`.
One question is, why do we need two libraries? The only difference is, the static
library contains `omp_data.cu` and the bitcode library doesn't. It's unclear why
they were implemented in this way, but per D94565, there is no issue if we also
include the file into the bitcode library. Therefore, we can safely drop the
static library.
This patch is about the change in OpenMP. The driver will be updated as well if
this patch is accepted.
Reviewed By: jdoerfert, JonChesterfield
Differential Revision: https://reviews.llvm.org/D94573
More information about the All-commits
mailing list