llvm-project
41010281 - [offload] Add properties parameter to olLaunchKernel (#197897)

Commit
4 days ago
[offload] Add properties parameter to olLaunchKernel (#197897) Introduce a properties argument to olLaunchKernel to enable future extensions. This change adds initial extension for cooperative kernel launch. The change restores the functionality from: https://github.com/llvm/llvm-project/pull/184343 which was later reverted in: https://github.com/llvm/llvm-project/pull/197463 #184343 modified the API, and between the last rebase and the final merge, additional tests were added upstream(https://github.com/llvm/llvm-project/pull/193927) that still relied on the previous API version. Diff between this PR and #184343 ``` diff --git a/offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp b/offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp index 0251bffefe60..cd527f18db38 100644 --- a/offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp +++ b/offload/unittests/OffloadAPI/kernel/olLaunchKernel.cpp @@ -241,8 +241,8 @@ TEST_P(olLaunchKernelSingleCounterSyncEventTest, SuccessSyncEvent) { ArgsSingleCounter Args{LoopRange, NumberToAdd, (uint32_t *)InitValuePassed, (uint32_t *)ResNum}; - ASSERT_SUCCESS( - olLaunchKernel(Queue, Device, Kernel, &Args, sizeof(Args), &LaunchArgs)); + ASSERT_SUCCESS(olLaunchKernel(Queue, Device, Kernel, &Args, sizeof(Args), + &LaunchArgs, nullptr)); uint32_t FinalResVal = 0; ASSERT_SUCCESS(olMemcpy(Queue, &FinalResVal, Host, ResNum, Device, Size)); @@ -294,8 +294,8 @@ TEST_P(olLaunchKernelSingleCounterSyncEventTest, SuccessTwoQueues) { ArgsSingleCounter Args{LoopRange, NumberToAdd, (uint32_t *)InitValuePassed, (uint32_t *)ResNum1}; - ASSERT_SUCCESS( - olLaunchKernel(Queue, Device, Kernel, &Args, sizeof(Args), &LaunchArgs)); + ASSERT_SUCCESS(olLaunchKernel(Queue, Device, Kernel, &Args, sizeof(Args), + &LaunchArgs, nullptr)); ol_event_handle_t Event = nullptr; ASSERT_SUCCESS(olCreateEvent(Queue, &Event)); @@ -308,7 +308,7 @@ TEST_P(olLaunchKernelSingleCounterSyncEventTest, SuccessTwoQueues) { // been completed by the time the kernel is executed using the second queue, // the FinalResVal would be incorrect. ASSERT_SUCCESS(olLaunchKernel(Queue2, Device, Kernel, &Args2, sizeof(Args2), - &LaunchArgs)); + &LaunchArgs, nullptr)); ASSERT_SUCCESS(olSyncQueue(Queue2)); uint32_t FinalResVal = 0; ```
Author
Parents
Loading