Skip to content

Commit 0c83f8c

Browse files
[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
1 parent 2c8e22d commit 0c83f8c

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ set(cuda_sources
5858
${devicertl_base_directory}/common/src/cancel.cu
5959
${devicertl_base_directory}/common/src/critical.cu
6060
${devicertl_base_directory}/common/src/loop.cu
61+
${devicertl_base_directory}/common/src/libcall.cu
62+
${devicertl_base_directory}/common/src/reduction.cu
63+
${devicertl_base_directory}/common/src/omp_data.cu
6164
${devicertl_base_directory}/common/src/omptarget.cu
6265
${devicertl_base_directory}/common/src/parallel.cu
6366
${devicertl_base_directory}/common/src/sync.cu

openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu renamed to openmp/libomptarget/deviceRTLs/common/src/libcall.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===------------ libcall.cu - NVPTX OpenMP user calls ----------- CUDA -*-===//
1+
//===------------ libcall.cu - OpenMP GPU user calls ------------- CUDA -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

openmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu renamed to openmp/libomptarget/deviceRTLs/common/src/omp_data.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===------------ omp_data.cu - NVPTX OpenMP GPU objects --------- CUDA -*-===//
1+
//===------------ omp_data.cu - OpenMP GPU objects --------------- CUDA -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

openmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu renamed to openmp/libomptarget/deviceRTLs/common/src/reduction.cu

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//===---- reduction.cu - NVPTX OpenMP reduction implementation ---- CUDA
2-
//-*-===//
1+
//===---- reduction.cu - GPU OpenMP reduction implementation ----- CUDA -*-===//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
54
// See https://llvm.org/LICENSE.txt for license information.
@@ -11,9 +10,6 @@
1110
//
1211
//===----------------------------------------------------------------------===//
1312

14-
#include <complex.h>
15-
#include <stdio.h>
16-
1713
#include "common/omptarget.h"
1814
#include "target_impl.h"
1915

openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ if(LIBOMPTARGET_DEP_CUDA_FOUND)
5454
${devicertl_common_directory}/src/cancel.cu
5555
${devicertl_common_directory}/src/critical.cu
5656
src/data_sharing.cu
57-
src/libcall.cu
57+
${devicertl_common_directory}/src/libcall.cu
5858
src/target_impl.cu
5959
${devicertl_common_directory}/src/loop.cu
6060
${devicertl_common_directory}/src/omptarget.cu
6161
${devicertl_common_directory}/src/parallel.cu
62-
src/reduction.cu
62+
${devicertl_common_directory}/src/reduction.cu
6363
${devicertl_common_directory}/src/support.cu
6464
${devicertl_common_directory}/src/sync.cu
6565
${devicertl_common_directory}/src/task.cu
6666
)
6767

68-
set(omp_data_objects src/omp_data.cu)
68+
set(omp_data_objects ${devicertl_common_directory}/src/omp_data.cu)
6969

7070
# Get the compute capability the user requested or use SM_35 by default.
7171
# SM_35 is what clang uses by default.

0 commit comments

Comments
 (0)