Skip to content

Commit cf52459

Browse files
committed
[HIP] Fix error code for unsupported program info
Unsupported program info should return unsupported enumeration instead of unsupported feature. This aligns with the CUDA adapter and makes the CTS understand that these properties aren't failing but just unsupported.
1 parent cfe5912 commit cf52459

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/adapters/hip/program.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,10 @@ urProgramGetInfo(ur_program_handle_t hProgram, ur_program_info_t propName,
408408
case UR_PROGRAM_INFO_BINARIES:
409409
return ReturnValue(&hProgram->Binary, 1);
410410
case UR_PROGRAM_INFO_KERNEL_NAMES:
411-
return getKernelNames(hProgram);
411+
/* TODO: Add implementation for getKernelNames */
412+
UR_ASSERT(getKernelNames(hProgram), UR_RESULT_ERROR_UNSUPPORTED_FEATURE);
413+
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
414+
case UR_PROGRAM_INFO_NUM_KERNELS:
412415
case UR_PROGRAM_INFO_IL:
413416
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
414417
default:

test/conformance/program/program_adapter_hip.match

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
urProgramBuildTest.BuildFailure/*
22
# HIP hasn't implemented urProgramCreateWithNativeHandleTest
33
{{OPT}}urProgramCreateWithNativeHandleTest.Success/*
4-
# HIP doesn't expose kernel numbers or names
5-
urProgramGetInfoTest.Success/*__UR_PROGRAM_INFO_NUM_KERNELS
6-
urProgramGetInfoTest.Success/*__UR_PROGRAM_INFO_KERNEL_NAMES
74

85
# HIP hasn't implemented urProgramLink
96
{{OPT}}urProgramLinkTest.Success/*

0 commit comments

Comments
 (0)