[all-commits] [llvm/llvm-project] d2147b: [OpenMP] Fix always, from and delete for data absen...

Joel E. Denny via All-commits all-commits at lists.llvm.org
Fri Feb 19 08:17:47 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d2147b1a876187e6addd89b681d47f9f98a89669
      https://github.com/llvm/llvm-project/commit/d2147b1a876187e6addd89b681d47f9f98a89669
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2021-02-19 (Fri, 19 Feb 2021)

  Changed paths:
    M openmp/libomptarget/src/omptarget.cpp
    A openmp/libomptarget/test/mapping/data_absent_at_exit.c
    R openmp/libomptarget/test/mapping/present/target_exit_data.c
    A openmp/libomptarget/test/mapping/present/target_exit_data_delete.c
    A openmp/libomptarget/test/mapping/present/target_exit_data_release.c
    M openmp/libomptarget/test/mapping/target_data_array_extension_at_exit.c

  Log Message:
  -----------
  [OpenMP] Fix always,from and delete for data absent at exit

Without this patch, there's a runtime error for those map types at
exit from an "omp target data" or at "omp target exit data", but the
spec says the list item should be ignored.

This patch tests that fix in data_absent_at_exit.c, and it also
improves other testing for data that is not fully present at exit.

Reviewed By: grokos, RaviNarayanaswamy

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


  Commit: ef8b3b5ffd562955fbb78c72c7820cd9cd99d313
      https://github.com/llvm/llvm-project/commit/ef8b3b5ffd562955fbb78c72c7820cd9cd99d313
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2021-02-19 (Fri, 19 Feb 2021)

  Changed paths:
    M openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt

  Log Message:
  -----------
  [OpenMP] Fix nvptx CUDA_VERSION conversion

As mentioned in PR#49250, without this patch, ptxas for CUDA 9.1 fails
in the following two tests:

- openmp/libomptarget/test/mapping/lambda_mapping.cpp
- openmp/libomptarget/test/offloading/bug49021.cpp

The error looks like:

```
ptxas /tmp/lambda_mapping-081ea9.s, line 828; error   : Not a name of any known instruction: 'activemask'
```

The problem is that our cmake script converts CUDA version strings
incorrectly: 9.1 becomes 9100, but it should be 9010, as shown in
`getCudaVersion` in `clang/lib/Driver/ToolChains/Cuda.cpp`.  Thus,
`openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu`
inadvertently enables `activemask` because it apparently becomes
available in 9.2.  This patch fixes the conversion.

This patch does not fix the other two tests in PR#49250.

Reviewed By: tianshilei1992

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


Compare: https://github.com/llvm/llvm-project/compare/82492f24ffa7...ef8b3b5ffd56


More information about the All-commits mailing list