Skip to content

Commit

Permalink
Merge pull request #1658 from npmiller/fix-kernel-crash
Browse files Browse the repository at this point in the history
[CTS][CUDA][HIP] Skip invalid kernel argument test
  • Loading branch information
kbenzie committed May 23, 2024
2 parents ef2338b + 5e9fdaf commit 5894231
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/conformance/enqueue/enqueue_adapter_hip.match
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{{OPT}}urEnqueueKernelLaunchTest.InvalidKernelArgs/AMD_HIP_BACKEND___{{.*}}_
{{OPT}}urEnqueueKernelLaunchKernelWgSizeTest.NonMatchingLocalSize/AMD_HIP_BACKEND___{{.*}}_
{{OPT}}urEnqueueKernelLaunchKernelSubGroupTest.Success/AMD_HIP_BACKEND___{{.*}}_
{{OPT}}urEnqueueKernelLaunchUSMLinkedList.Success/AMD_HIP_BACKEND___{{.*}}___UsePoolEnabled
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/AMD_HIP_BACKEND___{{.*}}___copy_row_2D
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/AMD_HIP_BACKEND___{{.*}}___copy_3d_2d
Expand Down
10 changes: 10 additions & 0 deletions test/conformance/enqueue/urEnqueueKernelLaunch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ TEST_P(urEnqueueKernelLaunchTest, InvalidWorkGroupSize) {
}

TEST_P(urEnqueueKernelLaunchTest, InvalidKernelArgs) {
ur_platform_backend_t backend;
ASSERT_SUCCESS(urPlatformGetInfo(platform, UR_PLATFORM_INFO_BACKEND,
sizeof(ur_platform_backend_t), &backend,
nullptr));

if (backend == UR_PLATFORM_BACKEND_CUDA ||
backend == UR_PLATFORM_BACKEND_HIP) {
GTEST_FAIL() << "AMD and Nvidia can't check kernel arguments.";
}

// Enqueue kernel without setting any args
ASSERT_EQ_RESULT(urEnqueueKernelLaunch(queue, kernel, n_dimensions,
&global_offset, &global_size,
Expand Down

0 comments on commit 5894231

Please sign in to comment.