24 inline namespace _V1 {
60 cl_device_id
get()
const;
119 size_t SubDevicesCount)
const;
184 template <
typename Param>
typename Param::return_type
get_info()
const;
189 template <
typename Param>
212 bool has(aspect Aspect)
const;
227 std::optional<ext::oneapi::experimental::architecture> CategoryMinArch =
229 std::optional<ext::oneapi::experimental::architecture> CategoryMaxArch =
231 if (CategoryMinArch.has_value() && CategoryMaxArch.has_value())
242 template <
typename ReturnT>
245 const int forwardProgressGuaranteeSize = 3;
246 int guaranteeVal =
static_cast<int>(guarantee);
248 res.reserve(forwardProgressGuaranteeSize - guaranteeVal);
249 for (
int currentGuarantee = forwardProgressGuaranteeSize - 1;
250 currentGuarantee >= guaranteeVal; --currentGuarantee) {
307 bool MIsAssertFailSupported =
false;
308 mutable std::string MDeviceName;
309 mutable std::once_flag MDeviceNameFlag;
311 mutable std::once_flag MDeviceArchFlag;
312 std::pair<uint64_t, uint64_t> MDeviceHostBaseTime{0, 0};
Param::return_type get_backend_info() const
Queries SYCL queue for SYCL backend-specific information.
std::vector< device > create_sub_devices() const
Partition device into sub devices.
bool isRootDevice() const
sycl::detail::pi::PiDeviceType get_device_type() const
Return device type.
bool has(aspect Aspect) const
Indicates if the SYCL device has the given feature.
Param::return_type get_info() const
Queries this SYCL device for information requested by the template parameter param.
platform get_platform() const
Get associated SYCL platform.
bool isGetDeviceAndHostTimerSupported()
Check clGetDeviceAndHostTimer is available for fallback profiling.
bool extOneapiArchitectureIs(ext::oneapi::experimental::architecture Arch) const
std::string get_device_info_string(sycl::detail::pi::PiDeviceInfo InfoCode) const
Get device info string.
device_impl()
Constructs a SYCL device instance as a host device.
bool is_cpu() const
Check if device is a CPU device.
backend getBackend() const
Get the backend of this device.
static ReturnT getProgressGuaranteesUpTo(ext::oneapi::experimental::forward_progress_guarantee guarantee)
const PluginPtr & getPlugin() const
pi_native_handle getNative() const
Gets the native handle of the SYCL device.
bool is_gpu() const
Check if device is a GPU device.
uint64_t getCurrentDeviceTime()
Gets the current device timestamp.
std::string getDeviceName() const
sycl::detail::pi::PiDevice & getHandleRef()
Get reference to PI device.
bool has_extension(const std::string &ExtensionName) const
Check SYCL extension support by device.
bool extOneapiArchitectureIs(ext::oneapi::experimental::arch_category Category) const
static sycl::ext::oneapi::experimental::forward_progress_guarantee getHostProgressGuarantee(sycl::ext::oneapi::experimental::execution_scope threadScope, sycl::ext::oneapi::experimental::execution_scope coordinationScope)
sycl::ext::oneapi::experimental::forward_progress_guarantee getProgressGuarantee(ext::oneapi::experimental::execution_scope threadScope, ext::oneapi::experimental::execution_scope coordinationScope) const
bool is_affinity_supported(info::partition_affinity_domain AffinityDomain) const
Check if affinity partitioning by specified domain is supported by device.
bool isAssertFailSupported() const
cl_device_id get() const
Get instance of OpenCL device.
ext::oneapi::experimental::architecture getDeviceArch() const
Get device architecture.
bool supportsForwardProgress(ext::oneapi::experimental::forward_progress_guarantee guarantee, ext::oneapi::experimental::execution_scope threadScope, ext::oneapi::experimental::execution_scope coordinationScope) const
ext::oneapi::experimental::forward_progress_guarantee getImmediateProgressGuarantee(ext::oneapi::experimental::execution_scope coordination_scope) const
const sycl::detail::pi::PiDevice & getHandleRef() const
Get constant reference to PI device.
bool extOneapiCanCompile(ext::oneapi::experimental::source_language Language)
bool is_partition_supported(info::partition_property Prop) const
Check if desired partition property supported by device.
PlatformImplPtr getPlatformImpl() const
Get the platform impl serving this device.
bool is_accelerator() const
Check if device is an accelerator device.
static constexpr std::optional< ext::oneapi::experimental::architecture > get_category_min_architecture(ext::oneapi::experimental::arch_category Category)
std::shared_ptr< plugin > PluginPtr
std::shared_ptr< detail::platform_impl > PlatformImplPtr
static constexpr std::optional< ext::oneapi::experimental::architecture > get_category_max_architecture(ext::oneapi::experimental::arch_category Category)
forward_progress_guarantee
partition_affinity_domain
uintptr_t pi_native_handle
@ PI_DEVICE_TYPE_ACC
A PI device that is a dedicated accelerator.
@ PI_DEVICE_TYPE_GPU
A PI device that is a GPU.
@ PI_DEVICE_TYPE_CPU
A PI device that is the host processor.
C++ wrapper of extern "C" PI interfaces.