Skip to content

[NFC][SYCL] Speed up slow aspects by caching #18603

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

Open
wants to merge 2 commits into
base: sycl
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions sycl/source/detail/device_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2217,12 +2217,39 @@ class device_impl : public std::enable_shared_from_this<device_impl> {
mutable JointCache<
UREagerCache<UR_DEVICE_INFO_TYPE, UR_DEVICE_INFO_USE_NATIVE_ASSERT,
UR_DEVICE_INFO_EXTENSIONS>, //
URCallOnceCache<UR_DEVICE_INFO_NAME>, //
EagerCache<InfoInitializer>, //
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::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;

}; // class device_impl
Expand Down