-
Notifications
You must be signed in to change notification settings - Fork 797
[UR] Stop querying adapter fp16/fp64 support via extension. #15811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: sycl
Are you sure you want to change the base?
[UR] Stop querying adapter fp16/fp64 support via extension. #15811
Conversation
instead of checking separately
Not a member of llvm-reviewers-runtime
anymore, need someone else re-approve.
// Check if the device supports double precision floating point. | ||
bool isFp64Supported() const; | ||
|
||
// Check if the device supports half precision floating point. | ||
bool isFp16Supported() const; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't add extra methods. Existing interfaces should be enough, just change their implementation to the proper calls to the underlying UR queries.
CASE(fp16) { return has_extension("cl_khr_fp16"); } | ||
CASE(fp64) { return has_extension("cl_khr_fp64"); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This relied on the internal caching of the extensions string, we need to ensure that new underlying query is cached too. See
llvm/sycl/source/detail/device_impl.hpp
Lines 2265 to 2301 in 76a887e
mutable JointCache< | |
UREagerCache<UR_DEVICE_INFO_TYPE, UR_DEVICE_INFO_USE_NATIVE_ASSERT, | |
UR_DEVICE_INFO_EXTENSIONS>, // | |
URCallOnceCache<UR_DEVICE_INFO_NAME, | |
// USM: | |
UR_DEVICE_INFO_USM_DEVICE_SUPPORT, | |
UR_DEVICE_INFO_USM_HOST_SUPPORT, | |
UR_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT, | |
UR_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT, | |
UR_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT, | |
// | |
UR_DEVICE_INFO_ATOMIC_64>, // | |
EagerCache<InfoInitializer>, // | |
CallOnceCache<InfoInitializer, | |
ext::oneapi::experimental::info::device::architecture>, // | |
AspectCache<EagerCache, aspect::fp16, aspect::fp64, | |
aspect::int64_base_atomics, aspect::int64_extended_atomics, | |
aspect::ext_oneapi_atomic16>, | |
AspectCache< | |
CallOnceCache, | |
// Slow, >100ns (for baseline cached ~30..40ns): | |
aspect::ext_intel_pci_address, aspect::ext_intel_gpu_eu_count, | |
aspect::ext_intel_free_memory, aspect::ext_intel_fan_speed, | |
aspect::ext_intel_power_limits, | |
// medium-slow, 60-90ns (for baseline cached ~30..40ns): | |
aspect::ext_intel_gpu_eu_simd_width, aspect::ext_intel_gpu_slices, | |
aspect::ext_intel_gpu_subslices_per_slice, | |
aspect::ext_intel_gpu_eu_count_per_subslice, | |
aspect::ext_intel_device_info_uuid, | |
aspect::ext_intel_gpu_hw_threads_per_eu, | |
aspect::ext_intel_memory_clock_rate, | |
aspect::ext_intel_memory_bus_width, | |
aspect::ext_oneapi_bindless_images, | |
aspect::ext_oneapi_bindless_images_1d_usm, | |
aspect::ext_oneapi_bindless_images_2d_usm, | |
aspect::ext_oneapi_is_composite, aspect::ext_oneapi_is_component>> | |
MCache; |
We're trying to move the UR adapters away from returning hard coded OpenCL extension strings to report device capabilities, this is the first change in that direction.
Closes oneapi-src/unified-runtime#1374