File tree Expand file tree Collapse file tree 4 files changed +12
-22
lines changed Expand file tree Collapse file tree 4 files changed +12
-22
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,6 @@ if(${LIBOMPTARGET_GPU_LIBC_SUPPORT})
75
75
list (APPEND clang_opt_flags -DOMPTARGET_HAS_LIBC )
76
76
endif ()
77
77
78
- # Prepend -I to each list element
79
- set (LIBOMPTARGET_LLVM_INCLUDE_DIRS_DEVICERTL "${LIBOMPTARGET_LLVM_INCLUDE_DIRS} " )
80
- list (TRANSFORM LIBOMPTARGET_LLVM_INCLUDE_DIRS_DEVICERTL PREPEND "-I" )
81
-
82
78
# Set flags for LLVM Bitcode compilation.
83
79
set (bc_flags -c -flto -std=c++17 -fvisibility=hidden
84
80
${clang_opt_flags} -nogpulib -nostdlibinc
@@ -88,7 +84,6 @@ set(bc_flags -c -flto -std=c++17 -fvisibility=hidden
88
84
-I${include_directory}
89
85
-I${devicertl_base_directory}/../include
90
86
-I${devicertl_base_directory}/../../libc
91
- ${LIBOMPTARGET_LLVM_INCLUDE_DIRS_DEVICERTL}
92
87
)
93
88
94
89
# first create an object target
@@ -172,7 +167,6 @@ function(compileDeviceRTLLibrary target_name target_triple)
172
167
${include_directory}
173
168
${devicertl_base_directory} /../../libc
174
169
${devicertl_base_directory} /../include
175
- ${LIBOMPTARGET_LLVM_INCLUDE_DIRS}
176
170
)
177
171
install (TARGETS ${ide_target_name} EXCLUDE_FROM_ALL )
178
172
endif ()
Original file line number Diff line number Diff line change 21
21
#include " Synchronization.h"
22
22
#include " Workshare.h"
23
23
24
- #include " llvm/Frontend/OpenMP/OMPDeviceConstants.h"
25
-
26
24
using namespace ompx ;
27
25
26
+ // These flags are copied from "llvm/Frontend/OpenMP/OMPDeviceConstants.h" and
27
+ // must be kept in-sync.
28
+ enum OMPTgtExecModeFlags : unsigned char {
29
+ OMP_TGT_EXEC_MODE_GENERIC = 1 << 0 ,
30
+ OMP_TGT_EXEC_MODE_SPMD = 1 << 1 ,
31
+ OMP_TGT_EXEC_MODE_GENERIC_SPMD =
32
+ OMP_TGT_EXEC_MODE_GENERIC | OMP_TGT_EXEC_MODE_SPMD
33
+ };
34
+
28
35
static void
29
36
inititializeRuntime (bool IsSPMD, KernelEnvironmentTy &KernelEnvironment,
30
37
KernelLaunchEnvironmentTy &KernelLaunchEnvironment) {
@@ -74,8 +81,7 @@ extern "C" {
74
81
int32_t __kmpc_target_init (KernelEnvironmentTy &KernelEnvironment,
75
82
KernelLaunchEnvironmentTy &KernelLaunchEnvironment) {
76
83
ConfigurationEnvironmentTy &Configuration = KernelEnvironment.Configuration ;
77
- bool IsSPMD = Configuration.ExecMode &
78
- llvm::omp::OMPTgtExecModeFlags::OMP_TGT_EXEC_MODE_SPMD;
84
+ bool IsSPMD = Configuration.ExecMode & OMP_TGT_EXEC_MODE_SPMD;
79
85
bool UseGenericStateMachine = Configuration.UseGenericStateMachine ;
80
86
if (IsSPMD) {
81
87
inititializeRuntime (/* IsSPMD=*/ true , KernelEnvironment,
Original file line number Diff line number Diff line change 16
16
#include " State.h"
17
17
#include " gpuintrin.h"
18
18
19
- #include " llvm/Frontend/OpenMP/OMPGridValues.h"
20
-
21
19
using namespace ompx ;
22
20
23
21
// FIXME: This resolves the handling for the AMDGPU workgroup size when the ABI
Original file line number Diff line number Diff line change 15
15
16
16
#include <stdint.h>
17
17
18
- #ifdef OMPTARGET_DEVICE_RUNTIME
19
- #include "DeviceTypes.h"
20
- #else
21
- #include "SourceInfo.h"
22
-
23
- using IdentTy = ident_t ;
24
- #endif
25
-
26
- #include "llvm/Frontend/OpenMP/OMPDeviceConstants.h"
18
+ struct IdentTy ;
27
19
28
20
enum class DeviceDebugKind : uint32_t {
29
21
Assertion = 1U << 0 ,
@@ -80,7 +72,7 @@ struct DynamicEnvironmentTy {
80
72
struct ConfigurationEnvironmentTy {
81
73
uint8_t UseGenericStateMachine = 2 ;
82
74
uint8_t MayUseNestedParallelism = 2 ;
83
- llvm :: omp :: OMPTgtExecModeFlags ExecMode = llvm :: omp :: OMP_TGT_EXEC_MODE_SPMD ;
75
+ uint8_t ExecMode = 0 ;
84
76
// Information about (legal) launch configurations.
85
77
//{
86
78
int32_t MinThreads = -1 ;
You can’t perform that action at this time.
0 commit comments