Skip to content

Commit

Permalink
[SYCL][HIP] Add cl_khr_fp64 in device extensions (#7428)
Browse files Browse the repository at this point in the history
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")`.
  • Loading branch information
fxzjshm authored Nov 21, 2022
1 parent 72d9b05 commit cd832bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sycl/plugins/hip/pi_hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,13 @@ pi_result hip_piDeviceGetInfo(pi_device device, pi_device_info param_name,
SupportedExtensions += PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT;
SupportedExtensions += " ";

hipDeviceProp_t props;
sycl::detail::pi::assertion(hipGetDeviceProperties(&props, device->get()) ==
hipSuccess);
if (props.arch.hasDoubles) {
SupportedExtensions += "cl_khr_fp64 ";
}

return getInfo(param_value_size, param_value, param_value_size_ret,
SupportedExtensions.c_str());
}
Expand Down

0 comments on commit cd832bf

Please sign in to comment.