Skip to content

Commit c06abd1

Browse files
author
Fábio Mestre
committed
Fix mistakes in tests
1 parent 5122527 commit c06abd1

File tree

13 files changed

+17
-759
lines changed

13 files changed

+17
-759
lines changed

include/ur_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8393,7 +8393,7 @@ urCommandBufferFinalizeExp(
83938393
/// - ::UR_RESULT_ERROR_INVALID_VALUE
83948394
/// + `phKernelAlternatives == NULL && numKernelAlternatives > 0`
83958395
/// + `phKernelAlternatives != NULL && numKernelAlternatives == 0`
8396-
/// + `phKernelAlternatives` contains `hKernel`
8396+
/// + If `phKernelAlternatives` contains `hKernel`
83978397
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP
83988398
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP
83998399
/// + `pSyncPointWaitList == NULL && numSyncPointsInWaitList > 0`

scripts/core/exp-command-buffer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ returns:
341341
- $X_RESULT_ERROR_INVALID_VALUE:
342342
- "`phKernelAlternatives == NULL && numKernelAlternatives > 0`"
343343
- "`phKernelAlternatives != NULL && numKernelAlternatives == 0`"
344-
- "`phKernelAlternatives` contains `hKernel`"
344+
- "If `phKernelAlternatives` contains `hKernel`"
345345
- $X_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP
346346
- $X_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP:
347347
- "`pSyncPointWaitList == NULL && numSyncPointsInWaitList > 0`"

source/adapters/cuda/command_buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp(
879879
return UR_RESULT_ERROR_INVALID_OPERATION;
880880
}
881881

882-
if (auto NewWorkDim = pUpdateKernelLaunch->newWorkDim) {
882+
if (pUpdateKernelLaunch->newWorkDim) {
883883

884884
// Error If Local size and not global size
885885
if ((pUpdateKernelLaunch->pNewLocalWorkSize != nullptr) &&

source/adapters/level_zero/v2/api.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
507507
ur_exp_command_buffer_handle_t hCommandBuffer, ur_kernel_handle_t hKernel,
508508
uint32_t workDim, const size_t *pGlobalWorkOffset,
509509
const size_t *pGlobalWorkSize, const size_t *pLocalWorkSize,
510+
uint32_t numKernelAlternatives, ur_kernel_handle_t *phKernelAlternatives,
510511
uint32_t numSyncPointsInWaitList,
511512
const ur_exp_command_buffer_sync_point_t *pSyncPointWaitList,
512513
ur_exp_command_buffer_sync_point_t *pSyncPoint,

source/loader/layers/validation/ur_valddi.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8105,10 +8105,6 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
81058105
return UR_RESULT_ERROR_INVALID_VALUE;
81068106
}
81078107

8108-
if (phKernelAlternatives` contains `hKernel) {
8109-
return UR_RESULT_ERROR_INVALID_VALUE;
8110-
}
8111-
81128108
if (pSyncPointWaitList == NULL && numSyncPointsInWaitList > 0) {
81138109
return UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP;
81148110
}

source/loader/ur_libapi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7527,7 +7527,7 @@ ur_result_t UR_APICALL urCommandBufferFinalizeExp(
75277527
/// - ::UR_RESULT_ERROR_INVALID_VALUE
75287528
/// + `phKernelAlternatives == NULL && numKernelAlternatives > 0`
75297529
/// + `phKernelAlternatives != NULL && numKernelAlternatives == 0`
7530-
/// + `phKernelAlternatives` contains `hKernel`
7530+
/// + If `phKernelAlternatives` contains `hKernel`
75317531
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP
75327532
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP
75337533
/// + `pSyncPointWaitList == NULL && numSyncPointsInWaitList > 0`

source/ur_api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6383,7 +6383,7 @@ ur_result_t UR_APICALL urCommandBufferFinalizeExp(
63836383
/// - ::UR_RESULT_ERROR_INVALID_VALUE
63846384
/// + `phKernelAlternatives == NULL && numKernelAlternatives > 0`
63856385
/// + `phKernelAlternatives != NULL && numKernelAlternatives == 0`
6386-
/// + `phKernelAlternatives` contains `hKernel`
6386+
/// + If `phKernelAlternatives` contains `hKernel`
63876387
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP
63886388
/// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP
63896389
/// + `pSyncPointWaitList == NULL && numSyncPointsInWaitList > 0`
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
urCommandBufferKernelHandleUpdateTest.Success/AMD_HIP_BACKEND___{{.*}}_
2+
urCommandBufferKernelHandleUpdateTest.UpdateAgain/AMD_HIP_BACKEND___{{.*}}_
3+
urCommandBufferKernelHandleUpdateTest.KernelAlternativeNotRegistered/AMD_HIP_BACKEND___{{.*}}_
4+
urCommandBufferKernelHandleUpdateTest.RegisterInvalidKernelAlternative/AMD_HIP_BACKEND___{{.*}}_
Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,7 @@
1-
BufferFillCommandTest.UpdateParameters/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
2-
BufferFillCommandTest.UpdateGlobalSize/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
3-
BufferFillCommandTest.SeparateUpdateCalls/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
4-
BufferFillCommandTest.OverrideUpdate/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
5-
BufferFillCommandTest.OverrideArgList/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
6-
USMFillCommandTest.UpdateParameters/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
7-
USMFillCommandTest.UpdateBeforeEnqueue/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
8-
USMMultipleFillCommandTest.UpdateAllKernels/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
9-
BufferSaxpyKernelTest.UpdateParameters/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
10-
USMSaxpyKernelTest.UpdateParameters/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
11-
USMMultiSaxpyKernelTest.UpdateParameters/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
12-
USMMultiSaxpyKernelTest.UpdateWithoutBlocking/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
13-
NDRangeUpdateTest.Update3D/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
14-
NDRangeUpdateTest.Update2D/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
15-
NDRangeUpdateTest.Update1D/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
16-
NDRangeUpdateTest.Invalid/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
171
urCommandBufferReleaseExpTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
182
urCommandBufferReleaseExpTest.InvalidNullHandle/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
19-
urCommandBufferReleaseCommandExpTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
20-
urCommandBufferReleaseCommandExpTest.ReleaseCmdBufBeforeHandle/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
21-
urCommandBufferReleaseCommandExpTest.ReleaseCmdBufMultipleHandles/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
22-
urCommandBufferReleaseCommandExpTest.InvalidNullHandle/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
233
urCommandBufferRetainExpTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
244
urCommandBufferRetainExpTest.InvalidNullHandle/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
25-
urCommandBufferRetainCommandExpTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
26-
urCommandBufferRetainCommandExpTest.InvalidNullHandle/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
27-
InvalidUpdateTest.NotFinalizedCommandBuffer/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
28-
InvalidUpdateTest.NotUpdatableCommandBuffer/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
29-
InvalidUpdateTest.GlobalLocalSizeMistach/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
30-
InvalidUpdateTest.ImplToUserDefinedLocalSize/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
31-
InvalidUpdateTest.UserToImplDefinedLocalSize/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
325
urCommandBufferCommandsTest.urCommandBufferAppendUSMMemcpyExp/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
336
urCommandBufferCommandsTest.urCommandBufferAppendUSMFillExp/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
347
urCommandBufferCommandsTest.urCommandBufferAppendMemBufferCopyExp/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
@@ -55,8 +28,3 @@ urCommandBufferFillCommandsTest.USM/Intel_R__oneAPI_Unified_Runtime_over_Level_Z
5528
urCommandBufferFillCommandsTest.USM/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___size__256__patternSize__8
5629
urCommandBufferFillCommandsTest.USM/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___size__256__patternSize__16
5730
urCommandBufferFillCommandsTest.USM/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___size__256__patternSize__32
58-
urCommandBufferKernelHandleUpdateTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
59-
urCommandBufferKernelHandleUpdateTest.UpdateAgain/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
60-
urCommandBufferKernelHandleUpdateTest.KernelAlternativeNotRegistered/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
61-
urCommandBufferKernelHandleUpdateTest.RegisterInvalidKernelAlternative/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
62-

test/conformance/exp_command_buffer/update/kernel_handle_update.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
#include "uur/raii.h"
88
#include <cstring>
99

10-
// Tests that it is possible to update the kernel handle of a command-buffer node.
11-
// This test launches a Saxpy kernel using a command-buffer and then updates the
12-
// node with a completely different kernel that does a fill 2D operation.
1310
struct TestKernel {
1411

1512
TestKernel(std::string Name, ur_platform_handle_t Platform,
@@ -247,6 +244,9 @@ struct urCommandBufferKernelHandleUpdateTest
247244

248245
UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(urCommandBufferKernelHandleUpdateTest);
249246

247+
/* Tests that it is possible to update the kernel handle of a command-buffer node.
248+
* This test launches a Saxpy kernel using a command-buffer and then updates the
249+
* node with a completely different kernel that does a fill 2D operation. */
250250
TEST_P(urCommandBufferKernelHandleUpdateTest, Success) {
251251

252252
std::vector<ur_kernel_handle_t> KernelAlternatives = {

0 commit comments

Comments
 (0)