summaryrefslogtreecommitdiffstats
path: root/openmp
diff options
context:
space:
mode:
authorJonChesterfield <jonathanchesterfield@gmail.com>2019-12-17 18:02:48 +0000
committerJon Chesterfield <jonathanchesterfield@gmail.com>2019-12-17 18:02:49 +0000
commit0c83f8ccc745522d2a25bcef2067bde295be9f75 (patch)
tree9b12f59c18eddb50751796699efe981bd359765b /openmp
parent2c8e22d25c2091764ccde67812a3f707277052b2 (diff)
downloadbcm5719-llvm-0c83f8ccc745522d2a25bcef2067bde295be9f75.tar.gz
bcm5719-llvm-0c83f8ccc745522d2a25bcef2067bde295be9f75.zip
[libomptarget][nfc] Move three files under common, build them for amdgcn
Summary: [libomptarget][nfc] Move three files under common, build them for amdgcn Change to reduction.cu to remove two dead includes, otherwise no code change. Reviewers: jdoerfert, ABataev, grokos Reviewed By: jdoerfert Subscribers: jvesely, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D71601
Diffstat (limited to 'openmp')
-rw-r--r--openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt3
-rw-r--r--openmp/libomptarget/deviceRTLs/common/src/libcall.cu (renamed from openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu)2
-rw-r--r--openmp/libomptarget/deviceRTLs/common/src/omp_data.cu (renamed from openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu)2
-rw-r--r--openmp/libomptarget/deviceRTLs/common/src/reduction.cu (renamed from openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu)6
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt6
5 files changed, 9 insertions, 10 deletions
diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
index 802ab0b42cc..9eadbdb1e24 100644
--- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
+++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
@@ -58,6 +58,9 @@ set(cuda_sources
${devicertl_base_directory}/common/src/cancel.cu
${devicertl_base_directory}/common/src/critical.cu
${devicertl_base_directory}/common/src/loop.cu
+ ${devicertl_base_directory}/common/src/libcall.cu
+ ${devicertl_base_directory}/common/src/reduction.cu
+ ${devicertl_base_directory}/common/src/omp_data.cu
${devicertl_base_directory}/common/src/omptarget.cu
${devicertl_base_directory}/common/src/parallel.cu
${devicertl_base_directory}/common/src/sync.cu
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu b/openmp/libomptarget/deviceRTLs/common/src/libcall.cu
index baee6d1f45c..b9d37f48efa 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu
+++ b/openmp/libomptarget/deviceRTLs/common/src/libcall.cu
@@ -1,4 +1,4 @@
-//===------------ libcall.cu - NVPTX OpenMP user calls ----------- CUDA -*-===//
+//===------------ libcall.cu - OpenMP GPU user calls ------------- 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/nvptx/src/omp_data.cu b/openmp/libomptarget/deviceRTLs/common/src/omp_data.cu
index 9f8758acce8..5bef3b89a17 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu
+++ b/openmp/libomptarget/deviceRTLs/common/src/omp_data.cu
@@ -1,4 +1,4 @@
-//===------------ omp_data.cu - NVPTX OpenMP GPU objects --------- CUDA -*-===//
+//===------------ omp_data.cu - OpenMP GPU objects --------------- 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/nvptx/src/reduction.cu b/openmp/libomptarget/deviceRTLs/common/src/reduction.cu
index fa9c130c0fc..5db194866ea 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu
+++ b/openmp/libomptarget/deviceRTLs/common/src/reduction.cu
@@ -1,5 +1,4 @@
-//===---- reduction.cu - NVPTX OpenMP reduction implementation ---- CUDA
-//-*-===//
+//===---- reduction.cu - GPU OpenMP reduction implementation ----- 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,9 +10,6 @@
//
//===----------------------------------------------------------------------===//
-#include <complex.h>
-#include <stdio.h>
-
#include "common/omptarget.h"
#include "target_impl.h"
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
index 83308be39e5..d38d766a780 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
+++ b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
@@ -54,18 +54,18 @@ if(LIBOMPTARGET_DEP_CUDA_FOUND)
${devicertl_common_directory}/src/cancel.cu
${devicertl_common_directory}/src/critical.cu
src/data_sharing.cu
- src/libcall.cu
+ ${devicertl_common_directory}/src/libcall.cu
src/target_impl.cu
${devicertl_common_directory}/src/loop.cu
${devicertl_common_directory}/src/omptarget.cu
${devicertl_common_directory}/src/parallel.cu
- src/reduction.cu
+ ${devicertl_common_directory}/src/reduction.cu
${devicertl_common_directory}/src/support.cu
${devicertl_common_directory}/src/sync.cu
${devicertl_common_directory}/src/task.cu
)
- set(omp_data_objects src/omp_data.cu)
+ set(omp_data_objects ${devicertl_common_directory}/src/omp_data.cu)
# Get the compute capability the user requested or use SM_35 by default.
# SM_35 is what clang uses by default.
OpenPOWER on IntegriCloud