Skip to content

Commit c31ac7c

Browse files
committed
[HIP] Fix return type for urKernelGetInfo UR_KERNEL_INFO_NUM_ARGS
The property should be of type size_t. Note that we're removing a bunch of match lines for seemingly unrelated properties, but in fact the CTS tests do not make use of the parameter they claim, and in fact hard-code the UR_KERNEL_INFO_NUM_ARGS property.
1 parent 33eb5ea commit c31ac7c

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

source/adapters/hip/kernel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ struct ur_kernel_handle_t_ {
201201
/// offset. Note this only returns the current known number of arguments,
202202
/// not the real one required by the kernel, since this cannot be queried
203203
/// from the HIP Driver API
204-
uint32_t getNumArgs() const noexcept { return Args.Indices.size() - 1; }
204+
size_t getNumArgs() const noexcept { return Args.Indices.size() - 1; }
205205

206206
void setKernelArg(int Index, size_t Size, const void *Arg) {
207207
Args.addArg(Index, Size, Arg);

test/conformance/kernel/kernel_adapter_hip.match

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
urKernelGetGroupInfoWgSizeTest.CompileWorkGroupSize/AMD_HIP_BACKEND___{{.*}}_
22
urKernelGetInfoTest.Success/AMD_HIP_BACKEND___{{.*}}___UR_KERNEL_INFO_NUM_REGS
3-
urKernelGetInfoTest.InvalidSizeSmall/AMD_HIP_BACKEND___{{.*}}___UR_KERNEL_INFO_FUNCTION_NAME
4-
urKernelGetInfoTest.InvalidSizeSmall/AMD_HIP_BACKEND___{{.*}}___UR_KERNEL_INFO_NUM_ARGS
5-
urKernelGetInfoTest.InvalidSizeSmall/AMD_HIP_BACKEND___{{.*}}___UR_KERNEL_INFO_REFERENCE_COUNT
6-
urKernelGetInfoTest.InvalidSizeSmall/AMD_HIP_BACKEND___{{.*}}___UR_KERNEL_INFO_CONTEXT
7-
urKernelGetInfoTest.InvalidSizeSmall/AMD_HIP_BACKEND___{{.*}}___UR_KERNEL_INFO_PROGRAM
8-
urKernelGetInfoTest.InvalidSizeSmall/AMD_HIP_BACKEND___{{.*}}___UR_KERNEL_INFO_ATTRIBUTES
9-
urKernelGetInfoTest.InvalidSizeSmall/AMD_HIP_BACKEND___{{.*}}___UR_KERNEL_INFO_NUM_REGS
103
urKernelSetArgLocalTest.InvalidKernelArgumentIndex/AMD_HIP_BACKEND___{{.*}}_
114
urKernelSetArgMemObjTest.InvalidKernelArgumentIndex/AMD_HIP_BACKEND___{{.*}}_
125
urKernelSetArgPointerNegativeTest.InvalidKernelArgumentIndex/AMD_HIP_BACKEND___{{.*}}_

0 commit comments

Comments
 (0)