13
13
#define OMPTARGET_DEVICERTL_INTERFACE_H
14
14
15
15
#include "Types.h"
16
- #include "Xteamr .h"
16
+ #include "extra_allocators .h"
17
17
18
18
/// External API
19
19
///
@@ -154,13 +154,9 @@ int omp_test_lock(omp_lock_t *Lock);
154
154
/// Tasking
155
155
///
156
156
///{
157
- extern "C" {
158
157
int omp_in_final (void );
159
158
160
159
int omp_get_max_task_priority (void );
161
-
162
- void omp_fulfill_event (uint64_t );
163
- }
164
160
///}
165
161
166
162
/// Misc
@@ -170,50 +166,6 @@ double omp_get_wtick(void);
170
166
171
167
double omp_get_wtime (void );
172
168
///}
173
-
174
- /// OpenMP 5.1 Memory Management routines (from libomp)
175
- /// OpenMP allocator API is currently unimplemented, including traits.
176
- /// All allocation routines will directly call the global memory allocation
177
- /// routine and, consequently, omp_free will call device memory deallocation.
178
- ///
179
- /// {
180
- omp_allocator_handle_t omp_init_allocator (omp_memspace_handle_t m , int ntraits ,
181
- omp_alloctrait_t traits []);
182
-
183
- void omp_destroy_allocator (omp_allocator_handle_t allocator );
184
-
185
- void omp_set_default_allocator (omp_allocator_handle_t a );
186
-
187
- omp_allocator_handle_t omp_get_default_allocator (void );
188
-
189
- void * omp_alloc (uint64_t size ,
190
- omp_allocator_handle_t allocator = omp_null_allocator );
191
-
192
- void * omp_aligned_alloc (uint64_t align , uint64_t size ,
193
- omp_allocator_handle_t allocator = omp_null_allocator );
194
-
195
- void * omp_calloc (uint64_t nmemb , uint64_t size ,
196
- omp_allocator_handle_t allocator = omp_null_allocator );
197
-
198
- void * omp_aligned_calloc (uint64_t align , uint64_t nmemb , uint64_t size ,
199
- omp_allocator_handle_t allocator = omp_null_allocator );
200
-
201
- void * omp_realloc (void * ptr , uint64_t size ,
202
- omp_allocator_handle_t allocator = omp_null_allocator ,
203
- omp_allocator_handle_t free_allocator = omp_null_allocator );
204
-
205
- void omp_free (void * ptr , omp_allocator_handle_t allocator = omp_null_allocator );
206
- /// }
207
-
208
- /// CUDA exposes a native malloc/free API, while ROCm does not.
209
- //// Any re-definitions of malloc/free delete the native CUDA
210
- //// but they are necessary
211
- #ifdef __AMDGCN__
212
- void * malloc (uint64_t Size );
213
- void free (void * Ptr );
214
- size_t external_get_local_size (uint32_t dim );
215
- size_t external_get_num_groups (uint32_t dim );
216
- #endif
217
169
}
218
170
219
171
extern "C" {
@@ -260,9 +212,6 @@ uint32_t __kmpc_get_hardware_num_threads_in_block();
260
212
/// External interface to get the warp size.
261
213
uint32_t __kmpc_get_warp_size ();
262
214
263
- /// External interface to get the block size
264
- uint32_t __kmpc_get_hardware_num_blocks ();
265
-
266
215
/// Kernel
267
216
///
268
217
///{
@@ -306,8 +255,6 @@ int32_t __kmpc_cancel_barrier(IdentTy *Loc_ref, int32_t TId);
306
255
307
256
void __kmpc_barrier (IdentTy * Loc_ref , int32_t TId );
308
257
309
- void __kmpc_impl_syncthreads ();
310
-
311
258
void __kmpc_barrier_simple_spmd (IdentTy * Loc_ref , int32_t TId );
312
259
313
260
void __kmpc_barrier_simple_generic (IdentTy * Loc_ref , int32_t TId );
@@ -326,12 +273,6 @@ void __kmpc_end_single(IdentTy *Loc, int32_t TId);
326
273
327
274
void __kmpc_flush (IdentTy * Loc );
328
275
329
- void __kmpc_flush_acquire (IdentTy * Loc );
330
-
331
- void __kmpc_flush_release (IdentTy * Loc );
332
-
333
- void __kmpc_flush_acqrel (IdentTy * Loc );
334
-
335
276
uint64_t __kmpc_warp_active_thread_mask (void );
336
277
337
278
void __kmpc_syncwarp (uint64_t Mask );
@@ -401,10 +342,7 @@ void __kmpc_taskloop(IdentTy *Loc, uint32_t TId,
401
342
TaskDescriptorTy * TaskDescriptor , int ,
402
343
uint64_t * LowerBound , uint64_t * UpperBound , int64_t , int ,
403
344
int32_t , uint64_t , void * );
404
-
405
- void * __kmpc_task_allow_completion_event (IdentTy * loc_ref ,
406
- uint32_t gtid ,
407
- TaskDescriptorTy * task );
345
+ ///}
408
346
409
347
/// Misc
410
348
///
@@ -420,21 +358,6 @@ int32_t __kmpc_cancel(IdentTy *Loc, int32_t TId, int32_t CancelVal);
420
358
int32_t __kmpc_shuffle_int32 (int32_t val , int16_t delta , int16_t size );
421
359
int64_t __kmpc_shuffle_int64 (int64_t val , int16_t delta , int16_t size );
422
360
///}
423
-
424
- /// __init_ThreadDSTPtrPtr is defined in Workshare.cpp to initialize
425
- /// the static LDS global variable ThreadDSTPtrPtr to 0.
426
- /// It is called in Kernel.cpp at the end of initializeRuntime().
427
- void __init_ThreadDSTPtrPtr ();
428
361
}
429
362
430
- /// Extra API exposed by ROCm
431
- extern "C" {
432
- int omp_ext_get_warp_id (void );
433
- int omp_ext_get_lane_id (void );
434
- int omp_ext_get_master_thread_id (void );
435
- int omp_ext_get_smid (void );
436
- int omp_ext_is_spmd_mode (void );
437
- unsigned long long omp_ext_get_active_threads_mask (void );
438
- } // extern "C"
439
-
440
363
#endif
0 commit comments