Skip to content

Commit

Permalink
add unsupporteds
Browse files Browse the repository at this point in the history
  • Loading branch information
frasercrmck committed Aug 21, 2024
1 parent 52918b6 commit 8165d6d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/adapters/hip/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ urKernelGetGroupInfo(ur_kernel_handle_t hKernel, ur_device_handle_t hDevice,
&Bytes, HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES, hKernel->get()));
return ReturnValue(uint64_t(Bytes));
}
case UR_KERNEL_GROUP_INFO_COMPILE_MAX_WORK_GROUP_SIZE:
case UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_WORK_GROUP_SIZE:
// FIXME: could be added
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
default:
break;
}
Expand Down
4 changes: 4 additions & 0 deletions source/adapters/level_zero/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urKernelGetGroupInfo(
case UR_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE: {
return ReturnValue(uint32_t{Kernel->ZeKernelProperties->privateMemSize});
}
case UR_KERNEL_GROUP_INFO_COMPILE_MAX_WORK_GROUP_SIZE:
case UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_WORK_GROUP_SIZE:
// No corresponding enumeration in Level Zero
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
default: {
logger::error(
"Unknown ParamName in urKernelGetGroupInfo: ParamName={}(0x{})",
Expand Down
4 changes: 4 additions & 0 deletions source/adapters/native_cpu/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ urKernelGetGroupInfo(ur_kernel_handle_t hKernel, ur_device_handle_t hDevice,
int bytes = 0;
return returnValue(static_cast<uint64_t>(bytes));
}
case UR_KERNEL_GROUP_INFO_COMPILE_MAX_WORK_GROUP_SIZE:
case UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_WORK_GROUP_SIZE:
// FIXME: could be added
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;

default:
break;
Expand Down
4 changes: 4 additions & 0 deletions source/adapters/opencl/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ urKernelGetGroupInfo(ur_kernel_handle_t hKernel, ur_device_handle_t hDevice,
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
}
}
if (propName == UR_KERNEL_GROUP_INFO_COMPILE_MAX_WORK_GROUP_SIZE ||
propName == UR_KERNEL_GROUP_INFO_COMPILE_MAX_LINEAR_WORK_GROUP_SIZE) {
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
}
CL_RETURN_ON_FAILURE(clGetKernelWorkGroupInfo(
cl_adapter::cast<cl_kernel>(hKernel),
cl_adapter::cast<cl_device_id>(hDevice),
Expand Down

0 comments on commit 8165d6d

Please sign in to comment.