Author: Shilei Tian Date: 2023-02-02T17:02:02+01:00 New Revision: d8bf7d20d1e8714780454cda0a3a507d3c1a9422
URL: https://github.com/llvm/llvm-project/commit/d8bf7d20d1e8714780454cda0a3a507d3c1a9422 DIFF: https://github.com/llvm/llvm-project/commit/d8bf7d20d1e8714780454cda0a3a507d3c1a9422.diff LOG: [OpenMP][NVPTX] Added `__tgt_rtl_launch_kernel` in old CUDA plugin Fix #60248. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D142819 Added: Modified: openmp/libomptarget/plugins/cuda/src/rtl.cpp Removed: ################################################################################ diff --git a/openmp/libomptarget/plugins/cuda/src/rtl.cpp b/openmp/libomptarget/plugins/cuda/src/rtl.cpp index 67d1b2a2acfd1..f797011c80ea7 100644 --- a/openmp/libomptarget/plugins/cuda/src/rtl.cpp +++ b/openmp/libomptarget/plugins/cuda/src/rtl.cpp @@ -1901,6 +1901,21 @@ int32_t __tgt_rtl_init_device_info(int32_t DeviceId, return DeviceRTL.initDeviceInfo(DeviceId, DeviceInfoPtr, ErrStr); } +int32_t __tgt_rtl_launch_kernel(int32_t DeviceId, void *TgtEntryPtr, + void **TgtArgs, ptr diff _t *TgtOffsets, + KernelArgsTy *KernelArgs, + __tgt_async_info *AsyncInfo) { + assert(DeviceRTL.isValidDeviceId(DeviceId) && "device_id is invalid"); + + if (DeviceRTL.setContext(DeviceId) != OFFLOAD_SUCCESS) + return OFFLOAD_FAIL; + + return DeviceRTL.runTargetTeamRegion( + DeviceId, TgtEntryPtr, TgtArgs, TgtOffsets, KernelArgs->NumArgs, + KernelArgs->NumTeams[0], KernelArgs->ThreadLimit[0], + KernelArgs->Tripcount, AsyncInfo); +} + #ifdef __cplusplus } #endif _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits