[all-commits] [llvm/llvm-project] 95a2eb: [libcxx] Add testing configuration for GPU target...

Joseph Huber via All-commits all-commits at lists.llvm.org
Mon Nov 4 10:58:45 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 95a2eb70cf850597a5e871380807911e55f341a7
      https://github.com/llvm/llvm-project/commit/95a2eb70cf850597a5e871380807911e55f341a7
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-11-04 (Mon, 04 Nov 2024)

  Changed paths:
    M libcxx/cmake/caches/AMDGPU.cmake
    M libcxx/cmake/caches/NVPTX.cmake
    A libcxx/test/configs/amdgpu-libc++-shared.cfg.in
    A libcxx/test/configs/nvptx-libc++-shared.cfg.in
    M libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_range.pass.cpp
    M libcxx/test/std/strings/basic.string/string.modifiers/string_replace/replace_with_range.pass.cpp
    M libcxx/utils/libcxx/test/features.py

  Log Message:
  -----------
   [libcxx] Add testing configuration for GPU targets (#104515)

Summary:
The GPU runs these tests using the files built from the `libc` project.
These will be placed in `include/<triple>` and `lib/<triple>`. We use
the `amdhsa-loader` and `nvptx-loader` tools, which are also provided by
`libc`. These launch a kernel called `_start` which calls `main` so we
can pretend like GPU programs are normal terminal applications.

We force serial exeuction here, because `llvm-lit` runs way too many
processes in parallel, which has a bad habit of making the GPU drivers
hang or run out of resources. This allows the compilation to be run in
parallel while the jobs themselves are serialized via a file lock.

In the future this can likely be refined to accept user specified
architectures, or better handle including the root directory by exposing
that instead of just `include/<triple>/c++/v1/`.

This currently fails ~1% of the tests on AMDGPU and ~3% of the tests on
NVPTX. This will hopefully be reduced further, and later patches can
XFAIL a lot of them once it's down to a reasonable number.

Future support will likely want to allow passing in a custom
architecture instead of simply relying on `-mcpu=native`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list