Skip to content

Commit

Permalink
Merge pull request #1863 from kbenzie/benie/main-reverts
Browse files Browse the repository at this point in the history
Revert "Merge pull request #1849 from ayylol/cl-subgroupsizes"
  • Loading branch information
kbenzie committed Jul 15, 2024
2 parents ddafd29 + 6c7d7a7 commit 7e38af7
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions source/adapters/opencl/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,28 +938,17 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
return UR_RESULT_SUCCESS;
}
case UR_DEVICE_INFO_SUB_GROUP_SIZES_INTEL: {
/* CL_DEVICE_SUB_GROUP_SIZES_INTEL is only supported if the device has the
* cl_intel_required_subgroup_size extension.
* */
bool Supported = false;
CL_RETURN_ON_FAILURE(cl_adapter::checkDeviceExtensions(
cl_adapter::cast<cl_device_id>(hDevice),
{"cl_intel_required_subgroup_size"}, Supported));
if (Supported) {
// Have to convert size_t to uint32_t
size_t SubGroupSizesSize = 0;
CL_RETURN_ON_FAILURE(
clGetDeviceInfo(cl_adapter::cast<cl_device_id>(hDevice), CLPropName,
0, nullptr, &SubGroupSizesSize));
std::vector<size_t> SubGroupSizes(SubGroupSizesSize / sizeof(size_t));
CL_RETURN_ON_FAILURE(
clGetDeviceInfo(cl_adapter::cast<cl_device_id>(hDevice), CLPropName,
SubGroupSizesSize, SubGroupSizes.data(), nullptr));
return ReturnValue.template operator()<uint32_t>(SubGroupSizes.data(),
SubGroupSizes.size());
} else {
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
}
// Have to convert size_t to uint32_t
size_t SubGroupSizesSize = 0;
CL_RETURN_ON_FAILURE(
clGetDeviceInfo(cl_adapter::cast<cl_device_id>(hDevice), CLPropName, 0,
nullptr, &SubGroupSizesSize));
std::vector<size_t> SubGroupSizes(SubGroupSizesSize / sizeof(size_t));
CL_RETURN_ON_FAILURE(
clGetDeviceInfo(cl_adapter::cast<cl_device_id>(hDevice), CLPropName,
SubGroupSizesSize, SubGroupSizes.data(), nullptr));
return ReturnValue.template operator()<uint32_t>(SubGroupSizes.data(),
SubGroupSizes.size());
}
case UR_DEVICE_INFO_EXTENSIONS: {
cl_device_id Dev = cl_adapter::cast<cl_device_id>(hDevice);
Expand Down

0 comments on commit 7e38af7

Please sign in to comment.