23 inline namespace _V1 {
59 cl_device_id
get()
const;
68 throw invalid_object_error(
"This instance of device is a host instance",
69 PI_ERROR_INVALID_DEVICE);
81 throw invalid_object_error(
"This instance of device is a host instance",
82 PI_ERROR_INVALID_DEVICE);
90 bool is_host()
const {
return MIsHostDevice; }
137 size_t SubDevicesCount)
const;
202 template <
typename Param>
typename Param::return_type
get_info()
const;
207 template <
typename Param>
230 bool has(aspect Aspect)
const;
250 std::optional<ext::oneapi::experimental::architecture> CategoryMinArch =
252 std::optional<ext::oneapi::experimental::architecture> CategoryMaxArch =
254 if (CategoryMinArch.has_value() && CategoryMaxArch.has_value())
293 bool MIsAssertFailSupported =
false;
294 mutable std::string MDeviceName;
295 mutable std::once_flag MDeviceNameFlag;
297 mutable std::once_flag MDeviceArchFlag;
298 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.
bool is_host() const
Check if SYCL device is a host device.
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.
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
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.
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.
static std::shared_ptr< device_impl > getHostDeviceImpl()
Gets the single instance of the Host 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)
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.