diff --git a/projects/hip/include/hip/hcc_detail/hip_runtime_api.h b/projects/hip/include/hip/hcc_detail/hip_runtime_api.h index d4ac271e6c..36b1ddf79e 100755 --- a/projects/hip/include/hip/hcc_detail/hip_runtime_api.h +++ b/projects/hip/include/hip/hcc_detail/hip_runtime_api.h @@ -232,6 +232,9 @@ enum hipLimit_t { #define hipCpuDeviceId ((int)-1) #define hipInvalidDeviceId ((int)-2) +// Flags that can be used with hipExtLaunch Set of APIs +#define hipExtAnyOrderLaunch 0x01 ///< AnyOrderLaunch of kernels + /* * @brief HIP Memory Advise values * @enum diff --git a/projects/hip/rocclr/hip_module.cpp b/projects/hip/rocclr/hip_module.cpp index 5c75deb776..051578dc0a 100755 --- a/projects/hip/rocclr/hip_module.cpp +++ b/projects/hip/rocclr/hip_module.cpp @@ -288,6 +288,11 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, profileNDRange = (startEvent != nullptr && stopEvent != nullptr); + // Flag set to 1 signifies that kernel can be launched in anyorder + if (flags & hipExtAnyOrderLaunch) { + params |= amd::NDRangeKernelCommand::AnyOrderLaunch; + } + amd::NDRangeKernelCommand* command = new amd::NDRangeKernelCommand( *queue, waitList, *kernel, ndrange, sharedMemBytes, params, gridId, numGrids, prevGridSum, allGridSum, firstDevice, profileNDRange);