[all-commits] [llvm/llvm-project] 0f7e86: [LinkerWrapper] Perform device linking steps in pa...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Nov 11 11:46:48 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f7e8631547ad2cbbe5bcf1933e1353e58f58406
      https://github.com/llvm/llvm-project/commit/0f7e8631547ad2cbbe5bcf1933e1353e58f58406
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-11-11 (Fri, 11 Nov 2022)

  Changed paths:
    M clang/test/Driver/linker-wrapper.c
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
    M clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td

  Log Message:
  -----------
  [LinkerWrapper] Perform device linking steps in parallel

This patch changes the device linking steps to be performed in parallel
when multiple offloading architectures are being used. We use the LLVM
parallelism support to accomplish this by simply doing each inidividual
device linking job in a single thread. This change required re-parsing
the input arguments as these arguments have internal state that would
not be properly shared between the threads otherwise.

By default, the parallelism uses all threads availible. But this can be
controlled with the `--wrapper-jobs=` option. This was required in a few
tests to ensure the ordering was still deterministic.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D136701




More information about the All-commits mailing list