Skip to content

Commit cd832bf

Browse files
authored
[SYCL][HIP] Add cl_khr_fp64 in device extensions (#7428)
HIP plugin didn't have `cl_khr_fp64` in SupportedExtensions, so any kernel uses fp64 cannot be launched because `ProgramManager::getBuiltPIProgram` checks `has(aspect::fp64)` which is actually `has_extension("cl_khr_fp64")`.
1 parent 72d9b05 commit cd832bf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sycl/plugins/hip/pi_hip.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,6 +1659,13 @@ pi_result hip_piDeviceGetInfo(pi_device device, pi_device_info param_name,
16591659
SupportedExtensions += PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT;
16601660
SupportedExtensions += " ";
16611661

1662+
hipDeviceProp_t props;
1663+
sycl::detail::pi::assertion(hipGetDeviceProperties(&props, device->get()) ==
1664+
hipSuccess);
1665+
if (props.arch.hasDoubles) {
1666+
SupportedExtensions += "cl_khr_fp64 ";
1667+
}
1668+
16621669
return getInfo(param_value_size, param_value, param_value_size_ret,
16631670
SupportedExtensions.c_str());
16641671
}

0 commit comments

Comments
 (0)