Skip to content

Commit

Permalink
[libomptarget][nfc] Move three files under common, build them for amdgcn
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JonChesterfield committed Dec 17, 2019
1 parent 2c8e22d commit 0c83f8c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
3 changes: 3 additions & 0 deletions openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
Expand Up @@ -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
Expand Down
@@ -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.
Expand Down
@@ -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.
Expand Down
@@ -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.
Expand All @@ -11,9 +10,6 @@
//
//===----------------------------------------------------------------------===//

#include <complex.h>
#include <stdio.h>

#include "common/omptarget.h"
#include "target_impl.h"

Expand Down
6 changes: 3 additions & 3 deletions openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
Expand Up @@ -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.
Expand Down

0 comments on commit 0c83f8c

Please sign in to comment.