diff options
| author | Jon Chesterfield <jonathanchesterfield@gmail.com> | 2019-12-05 20:34:14 +0000 | 
|---|---|---|
| committer | Jon Chesterfield <jonathanchesterfield@gmail.com> | 2019-12-05 20:34:15 +0000 | 
| commit | d0b9ed5c490ef10e4af750720a65a6cc6ba41af2 (patch) | |
| tree | f98caf4c96efada34caf551bfb2a4ab02d126012 | |
| parent | 1ea1e053f6a10955a5aa8f5a8007544a846766e5 (diff) | |
| download | bcm5719-llvm-d0b9ed5c490ef10e4af750720a65a6cc6ba41af2.tar.gz bcm5719-llvm-d0b9ed5c490ef10e4af750720a65a6cc6ba41af2.zip  | |
[libomptarget][nfc] Move omptarget-nvptx under common
Summary:
[libomptarget][nfc] Move omptarget-nvptx under common
Almost all files depend on require omptarget-nvptx, which no longer
contains any obviously architecture dependent code. Moving it under
common unblocks task/loop for amdgcn, and allows moving other code.
At some point there should probably be a widespread symbol renaming to
replace the nvptx string. I'd prefer to get things working first.
Building this (and task.cu, loop.cu) without a cuda library requires
some more refactoring, e.g. wrap threadfence(), use DEVICE macro more
consistently. Patches for that are orthogonal and will be posted shortly.
Reviewers: jdoerfert, ABataev, grokos
Reviewed By: ABataev
Subscribers: mgorny, fedor.sergeev, jfb, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D71073
13 files changed, 17 insertions, 17 deletions
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h b/openmp/libomptarget/deviceRTLs/common/omptarget.h index 51e88adee6d..5e3c02b1534 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h +++ b/openmp/libomptarget/deviceRTLs/common/omptarget.h @@ -1,4 +1,4 @@ -//===---- omptarget-nvptx.h - NVPTX OpenMP GPU initialization ---- CUDA -*-===// +//===---- omptarget.h - OpenMP GPU initialization ---------------- CUDA -*-===//  //  // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.  // See https://llvm.org/LICENSE.txt for license information. @@ -11,8 +11,8 @@  //  //===----------------------------------------------------------------------===// -#ifndef __OMPTARGET_NVPTX_H -#define __OMPTARGET_NVPTX_H +#ifndef OMPTARGET_H +#define OMPTARGET_H  // std includes  #include <inttypes.h> @@ -383,6 +383,6 @@ INLINE omptarget_nvptx_TaskDescr *getMyTopTaskDescriptor(int globalThreadId);  // inlined implementation  //////////////////////////////////////////////////////////////////////////////// -#include "omptarget-nvptxi.h" +#include "common/omptargeti.h"  #endif diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptxi.h b/openmp/libomptarget/deviceRTLs/common/omptargeti.h index e4efa180808..b952a8dc484 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptxi.h +++ b/openmp/libomptarget/deviceRTLs/common/omptargeti.h @@ -1,4 +1,4 @@ -//===---- omptarget-nvptxi.h - NVPTX OpenMP GPU initialization --- CUDA -*-===// +//===---- omptargeti.h - OpenMP GPU initialization --------------- CUDA -*-===//  //  // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.  // See https://llvm.org/LICENSE.txt for license information. diff --git a/openmp/libomptarget/deviceRTLs/common/src/loop.cu b/openmp/libomptarget/deviceRTLs/common/src/loop.cu index 3eff3a15bd4..45bf8f40a92 100644 --- a/openmp/libomptarget/deviceRTLs/common/src/loop.cu +++ b/openmp/libomptarget/deviceRTLs/common/src/loop.cu @@ -12,7 +12,7 @@  //  //===----------------------------------------------------------------------===// -#include "omptarget-nvptx.h" +#include "common/omptarget.h"  #include "target_impl.h"  //////////////////////////////////////////////////////////////////////////////// diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu b/openmp/libomptarget/deviceRTLs/common/src/omptarget.cu index 0481bdf854f..f99156cca44 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu +++ b/openmp/libomptarget/deviceRTLs/common/src/omptarget.cu @@ -1,4 +1,4 @@ -//===--- omptarget-nvptx.cu - NVPTX OpenMP GPU initialization ---- CUDA -*-===// +//===--- omptarget.cu - OpenMP GPU initialization ---------------- CUDA -*-===//  //  // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.  // See https://llvm.org/LICENSE.txt for license information. @@ -10,7 +10,7 @@  //  //===----------------------------------------------------------------------===// -#include "omptarget-nvptx.h" +#include "common/omptarget.h"  #include "target_impl.h"  //////////////////////////////////////////////////////////////////////////////// diff --git a/openmp/libomptarget/deviceRTLs/common/src/task.cu b/openmp/libomptarget/deviceRTLs/common/src/task.cu index d618ff16de1..d04ec50afd3 100644 --- a/openmp/libomptarget/deviceRTLs/common/src/task.cu +++ b/openmp/libomptarget/deviceRTLs/common/src/task.cu @@ -27,7 +27,7 @@  //  //===----------------------------------------------------------------------===// -#include "omptarget-nvptx.h" +#include "common/omptarget.h"  EXTERN kmp_TaskDescr *__kmpc_omp_task_alloc(      kmp_Ident *loc,     // unused diff --git a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt index c3b2db05c3a..eaf4c11d086 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt +++ b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt @@ -56,7 +56,7 @@ if(LIBOMPTARGET_DEP_CUDA_FOUND)        src/data_sharing.cu        src/libcall.cu        ${devicertl_common_directory}/src/loop.cu -      src/omptarget-nvptx.cu +      ${devicertl_common_directory}/src/omptarget.cu        src/parallel.cu        src/reduction.cu        src/support.cu diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu index f2892acb790..43d6cc12f95 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu @@ -9,7 +9,7 @@  // This file contains the implementation of data sharing environments/  //  //===----------------------------------------------------------------------===// -#include "omptarget-nvptx.h" +#include "common/omptarget.h"  #include "target_impl.h"  #include <stdio.h> diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu index e86b1d1fdbf..d8656f34591 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu @@ -11,7 +11,7 @@  //  //===----------------------------------------------------------------------===// -#include "omptarget-nvptx.h" +#include "common/omptarget.h"  // Timer precision is 1ns  #define TIMER_PRECISION ((double)1E-9) diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu index 46ed8f4ef34..4d3701e8f07 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu @@ -10,7 +10,7 @@  //  //===----------------------------------------------------------------------===// -#include "omptarget-nvptx.h" +#include "common/omptarget.h"  #include "common/device_environment.h"  //////////////////////////////////////////////////////////////////////////////// diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu index aa017277866..02106f5ec74 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu @@ -32,7 +32,7 @@  //  //===----------------------------------------------------------------------===// -#include "omptarget-nvptx.h" +#include "common/omptarget.h"  #include "target_impl.h"  typedef struct ConvergentSimdJob { diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu index da7204df412..1bedb2379ca 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu @@ -14,7 +14,7 @@  #include <complex.h>  #include <stdio.h> -#include "omptarget-nvptx.h" +#include "common/omptarget.h"  #include "target_impl.h"  EXTERN diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/support.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/support.cu index b5efa632b00..10c9c0930cf 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/support.cu +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/support.cu @@ -12,7 +12,7 @@  #include "common/support.h"  #include "common/debug.h" -#include "omptarget-nvptx.h" +#include "common/omptarget.h"  ////////////////////////////////////////////////////////////////////////////////  // Execution Parameters diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu index f36e877bff1..808e747875f 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu @@ -10,7 +10,7 @@  //  //===----------------------------------------------------------------------===// -#include "omptarget-nvptx.h" +#include "common/omptarget.h"  #include "target_impl.h"  ////////////////////////////////////////////////////////////////////////////////  | 

