DPC++ Runtime
Runtime libraries for oneAPI DPC++
device_impl.cpp
Go to the documentation of this file.
1 //==----------------- device_impl.cpp - SYCL device ------------------------==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include <CL/sycl/device.hpp>
10 #include <detail/device_impl.hpp>
11 #include <detail/platform_impl.hpp>
12 
13 #include <algorithm>
14 
16 namespace sycl {
17 namespace detail {
18 
19 device_impl::device_impl()
20  : MIsHostDevice(true), MPlatform(platform_impl::getHostPlatformImpl()),
21  // assert is natively supported by host
22  MIsAssertFailSupported(true) {}
23 
25  const plugin &Plugin)
26  : device_impl(InteropDeviceHandle, nullptr, nullptr, Plugin) {}
27 
29  : device_impl(reinterpret_cast<pi_native_handle>(nullptr), Device, Platform,
30  Platform->getPlugin()) {}
31 
33  : device_impl(reinterpret_cast<pi_native_handle>(nullptr), Device, nullptr,
34  Plugin) {}
35 
36 device_impl::device_impl(pi_native_handle InteropDeviceHandle,
38  const plugin &Plugin)
39  : MDevice(Device), MIsHostDevice(false) {
40 
41  bool InteroperabilityConstructor = false;
42  if (Device == nullptr) {
43  assert(InteropDeviceHandle);
44  // Get PI device from the raw device handle.
45  // NOTE: this is for OpenCL interop only (and should go away).
46  // With SYCL-2020 BE generalization "make" functions are used instead.
48  InteropDeviceHandle, nullptr, &MDevice);
49  InteroperabilityConstructor = true;
50  }
51 
52  // TODO catch an exception and put it to list of asynchronous exceptions
54  MDevice, PI_DEVICE_INFO_TYPE, sizeof(RT::PiDeviceType), &MType, nullptr);
55 
56  // TODO catch an exception and put it to list of asynchronous exceptions
58  sizeof(RT::PiDevice), &MRootDevice,
59  nullptr);
60 
61  if (!InteroperabilityConstructor) {
62  // TODO catch an exception and put it to list of asynchronous exceptions
63  // Interoperability Constructor already calls DeviceRetain in
64  // piextDeviceFromNative.
65  Plugin.call<PiApiKind::piDeviceRetain>(MDevice);
66  }
67 
68  // set MPlatform
69  if (!Platform) {
70  Platform = platform_impl::getPlatformFromPiDevice(MDevice, Plugin);
71  }
72  MPlatform = Platform;
73 
74  MIsAssertFailSupported =
76 }
77 
79  if (!MIsHostDevice) {
80  // TODO catch an exception and put it to list of asynchronous exceptions
81  const detail::plugin &Plugin = getPlugin();
84  }
85 }
86 
88  info::partition_affinity_domain AffinityDomain) const {
89  auto SupportedDomains = get_info<info::device::partition_affinity_domains>();
90  return std::find(SupportedDomains.begin(), SupportedDomains.end(),
91  AffinityDomain) != SupportedDomains.end();
92 }
93 
94 cl_device_id device_impl::get() const {
95  if (MIsHostDevice) {
96  throw invalid_object_error(
97  "This instance of device doesn't support OpenCL interoperability.",
98  PI_ERROR_INVALID_DEVICE);
99  }
100  // TODO catch an exception and put it to list of asynchronous exceptions
102  return pi::cast<cl_device_id>(getNative());
103 }
104 
106  return createSyclObjFromImpl<platform>(MPlatform);
107 }
108 
109 bool device_impl::has_extension(const std::string &ExtensionName) const {
110  if (MIsHostDevice)
111  // TODO: implement extension management for host device;
112  return false;
113 
114  std::string AllExtensionNames =
116  this->getHandleRef(), this->getPlugin());
117  return (AllExtensionNames.find(ExtensionName) != std::string::npos);
118 }
119 
121  auto SupportedProperties = get_info<info::device::partition_properties>();
122  return std::find(SupportedProperties.begin(), SupportedProperties.end(),
123  Prop) != SupportedProperties.end();
124 }
125 
126 std::vector<device>
127 device_impl::create_sub_devices(const cl_device_partition_property *Properties,
128  size_t SubDevicesCount) const {
129 
130  std::vector<RT::PiDevice> SubDevices(SubDevicesCount);
131  pi_uint32 ReturnedSubDevices = 0;
132  const detail::plugin &Plugin = getPlugin();
134  MDevice, Properties, SubDevicesCount, SubDevices.data(),
135  &ReturnedSubDevices);
136  if (ReturnedSubDevices != SubDevicesCount) {
137  throw sycl::exception(
139  "Could not partition to the specified number of sub-devices");
140  }
141  // TODO: Need to describe the subdevice model. Some sub_device management
142  // may be necessary. What happens if create_sub_devices is called multiple
143  // times with the same arguments?
144  //
145  std::vector<device> res;
146  std::for_each(SubDevices.begin(), SubDevices.end(),
147  [&res, this](const RT::PiDevice &a_pi_device) {
148  device sycl_device = detail::createSyclObjFromImpl<device>(
149  MPlatform->getOrMakeDeviceImpl(a_pi_device, MPlatform));
150  res.push_back(sycl_device);
151  });
152  return res;
153 }
154 
155 std::vector<device> device_impl::create_sub_devices(size_t ComputeUnits) const {
156 
157  if (MIsHostDevice)
158  // TODO: implement host device partitioning
159  throw runtime_error(
160  "Partitioning to subdevices of the host device is not implemented yet",
161  PI_ERROR_INVALID_DEVICE);
162 
164  throw cl::sycl::feature_not_supported();
165  }
166  // If count exceeds the total number of compute units in the device, an
167  // exception with the errc::invalid error code must be thrown.
168  auto MaxComputeUnits = get_info<info::device::max_compute_units>();
169  if (ComputeUnits > MaxComputeUnits)
171  "Total counts exceed max compute units");
172 
173  size_t SubDevicesCount = MaxComputeUnits / ComputeUnits;
174  const pi_device_partition_property Properties[3] = {
176  0};
177  return create_sub_devices(Properties, SubDevicesCount);
178 }
179 
180 std::vector<device>
181 device_impl::create_sub_devices(const std::vector<size_t> &Counts) const {
182 
183  if (MIsHostDevice)
184  // TODO: implement host device partitioning
185  throw runtime_error(
186  "Partitioning to subdevices of the host device is not implemented yet",
187  PI_ERROR_INVALID_DEVICE);
188 
190  throw cl::sycl::feature_not_supported();
191  }
192  static const pi_device_partition_property P[] = {
194  std::vector<pi_device_partition_property> Properties(P, P + 3);
195 
196  // Fill the properties vector with counts and validate it
197  auto It = Properties.begin() + 1;
198  size_t TotalCounts = 0;
199  size_t NonZeroCounts = 0;
200  for (auto Count : Counts) {
201  TotalCounts += Count;
202  NonZeroCounts += (Count != 0) ? 1 : 0;
203  It = Properties.insert(It, Count);
204  }
205 
206  // If the number of non-zero values in counts exceeds the device‚Äôs maximum
207  // number of sub devices (as returned by info::device::
208  // partition_max_sub_devices) an exception with the errc::invalid
209  // error code must be thrown.
210  if (NonZeroCounts > get_info<info::device::partition_max_sub_devices>())
212  "Total non-zero counts exceed max sub-devices");
213 
214  // If the total of all the values in the counts vector exceeds the total
215  // number of compute units in the device (as returned by
216  // info::device::max_compute_units), an exception with the errc::invalid
217  // error code must be thrown.
218  if (TotalCounts > get_info<info::device::max_compute_units>())
220  "Total counts exceed max compute units");
221 
222  return create_sub_devices(Properties.data(), Counts.size());
223 }
224 
226  info::partition_affinity_domain AffinityDomain) const {
227 
228  if (MIsHostDevice)
229  // TODO: implement host device partitioning
230  throw runtime_error(
231  "Partitioning to subdevices of the host device is not implemented yet",
232  PI_ERROR_INVALID_DEVICE);
233 
236  !is_affinity_supported(AffinityDomain)) {
237  throw cl::sycl::feature_not_supported();
238  }
239  const pi_device_partition_property Properties[3] = {
241  (pi_device_partition_property)AffinityDomain, 0};
242 
243  pi_uint32 SubDevicesCount = 0;
244  const detail::plugin &Plugin = getPlugin();
246  MDevice, Properties, 0, nullptr, &SubDevicesCount);
247 
248  return create_sub_devices(Properties, SubDevicesCount);
249 }
250 
252  auto Plugin = getPlugin();
253  if (Plugin.getBackend() == backend::opencl)
254  Plugin.call<PiApiKind::piDeviceRetain>(getHandleRef());
255  pi_native_handle Handle;
256  Plugin.call<PiApiKind::piextDeviceGetNativeHandle>(getHandleRef(), &Handle);
257  return Handle;
258 }
259 
260 bool device_impl::has(aspect Aspect) const {
261  size_t return_size = 0;
262  pi_device_type device_type;
263 
264  switch (Aspect) {
265  case aspect::host:
266  return is_host();
267  case aspect::cpu:
268  return is_cpu();
269  case aspect::gpu:
270  return is_gpu();
271  case aspect::accelerator:
272  return is_accelerator();
273  case aspect::custom:
274  return false;
275  case aspect::fp16:
276  return has_extension("cl_khr_fp16");
277  case aspect::fp64:
278  return has_extension("cl_khr_fp64");
280  return get_info<info::device::ext_oneapi_bfloat16>();
281  case aspect::int64_base_atomics:
282  return has_extension("cl_khr_int64_base_atomics");
283  case aspect::int64_extended_atomics:
284  return has_extension("cl_khr_int64_extended_atomics");
285  case aspect::atomic64:
286  return get_info<info::device::atomic64>();
287  case aspect::image:
288  return get_info<info::device::image_support>();
290  return get_info<info::device::is_compiler_available>();
292  return get_info<info::device::is_linker_available>();
294  return get_info<info::device::queue_profiling>();
296  return get_info<info::device::usm_device_allocations>();
298  return get_info<info::device::usm_host_allocations>();
300  return is_host() ||
306  return get_info<info::device::usm_shared_allocations>();
308  return is_host() ||
312  getPlugin()) &
315  return get_info<info::device::usm_restricted_shared_allocations>();
317  return get_info<info::device::usm_system_allocations>();
320  MDevice, PI_DEVICE_INFO_PCI_ADDRESS, 0, nullptr, &return_size) ==
321  PI_SUCCESS;
325  &device_type, &return_size) == PI_SUCCESS;
329  sizeof(pi_device_type), &device_type,
330  &return_size) == PI_SUCCESS;
333  MDevice, PI_DEVICE_INFO_GPU_SLICES, sizeof(pi_device_type),
334  &device_type, &return_size) == PI_SUCCESS;
338  sizeof(pi_device_type), &device_type,
339  &return_size) == PI_SUCCESS;
343  sizeof(pi_device_type), &device_type,
344  &return_size) == PI_SUCCESS;
348  sizeof(pi_device_type), &device_type,
349  &return_size) == PI_SUCCESS;
352  MDevice, PI_DEVICE_INFO_UUID, 0, nullptr, &return_size);
353  if (Result != PI_SUCCESS) {
354  return false;
355  }
356 
357  assert(return_size <= 16);
358  unsigned char UUID[16];
359 
361  MDevice, PI_DEVICE_INFO_UUID, 16 * sizeof(unsigned char), UUID,
362  nullptr) == PI_SUCCESS;
363  }
365  // currently not supported
366  return false;
368  return get_info<info::device::ext_oneapi_srgb>();
370  return isAssertFailSupported();
372  int async_barrier_supported;
373  bool call_successful =
375  MDevice, PI_EXT_ONEAPI_DEVICE_INFO_CUDA_ASYNC_BARRIER, sizeof(int),
376  &async_barrier_supported, nullptr) == PI_SUCCESS;
377  return call_successful && async_barrier_supported;
378  }
379  default:
380  throw runtime_error("This device aspect has not been implemented yet.",
381  PI_ERROR_INVALID_DEVICE);
382  }
383 }
384 
385 std::shared_ptr<device_impl> device_impl::getHostDeviceImpl() {
386  static std::shared_ptr<device_impl> HostImpl =
387  std::make_shared<device_impl>();
388 
389  return HostImpl;
390 }
391 
393  return MIsAssertFailSupported;
394 }
395 
396 std::string device_impl::getDeviceName() const {
397  std::call_once(MDeviceNameFlag,
398  [this]() { MDeviceName = get_info<info::device::name>(); });
399 
400  return MDeviceName;
401 }
402 
403 } // namespace detail
404 } // namespace sycl
405 } // __SYCL_INLINE_NAMESPACE(cl)
cl::sycl::detail::device_impl::~device_impl
~device_impl()
Definition: device_impl.cpp:78
PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT
#define PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT
Extension to denote native support of assert feature by an arbitrary device piDeviceGetInfo call shou...
Definition: pi.h:721
cl::sycl::detail::device_impl::has
bool has(aspect Aspect) const
Indicates if the SYCL device has the given feature.
Definition: device_impl.cpp:260
cl::sycl::aspect::usm_system_allocations
@ usm_system_allocations
PI_DEVICE_PARTITION_EQUALLY
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_EQUALLY
Definition: pi.h:597
cl::sycl::aspect::gpu
@ gpu
cl::sycl::detail::device_impl::isAssertFailSupported
bool isAssertFailSupported() const
Definition: device_impl.cpp:392
cl::sycl::detail::device_impl::is_gpu
bool is_gpu() const
Check if device is a GPU device.
Definition: device_impl.hpp:98
cl::sycl::detail::device_impl::getPlugin
const plugin & getPlugin() const
Definition: device_impl.hpp:125
cl::sycl::aspect::ext_intel_gpu_eu_count
@ ext_intel_gpu_eu_count
PI_DEVICE_INFO_GPU_EU_COUNT
@ PI_DEVICE_INFO_GPU_EU_COUNT
Definition: pi.h:263
cl::sycl::aspect::usm_restricted_shared_allocations
@ usm_restricted_shared_allocations
cl::sycl::aspect::ext_intel_device_info_uuid
@ ext_intel_device_info_uuid
cl::sycl::detail::device_impl
Definition: device_impl.hpp:35
cl::sycl::aspect::ext_intel_gpu_subslices_per_slice
@ ext_intel_gpu_subslices_per_slice
cl::sycl::detail::device_impl::get
cl_device_id get() const
Get instance of OpenCL device.
Definition: device_impl.cpp:94
cl::sycl::backend::opencl
@ opencl
cl::sycl::detail::getPlugin
static const plugin & getPlugin(backend Backend)
Definition: backend.cpp:32
cl::sycl::info::device::usm_host_allocations
@ usm_host_allocations
cl::sycl::detail::for_each
Function for_each(Group g, Ptr first, Ptr last, Function f)
Definition: group_algorithm.hpp:148
device.hpp
piDevicePartition
pi_result piDevicePartition(pi_device device, const pi_device_partition_property *properties, pi_uint32 num_devices, pi_device *out_devices, pi_uint32 *out_num_devices)
Definition: pi_esimd_emulator.cpp:813
cl::sycl::aspect::image
@ image
pi_usm_capabilities
_pi_usm_capabilities pi_usm_capabilities
Definition: pi.h:1617
cl::sycl::detail::pi::PiDevice
::pi_device PiDevice
Definition: pi.hpp:102
PI_DEVICE_INFO_GPU_HW_THREADS_PER_EU
@ PI_DEVICE_INFO_GPU_HW_THREADS_PER_EU
Definition: pi.h:275
_pi_result
_pi_result
Definition: pi.h:105
PI_DEVICE_INFO_GPU_SLICES
@ PI_DEVICE_INFO_GPU_SLICES
Definition: pi.h:265
piDeviceRetain
pi_result piDeviceRetain(pi_device device)
Definition: pi_esimd_emulator.cpp:571
_pi_device_type
_pi_device_type
Definition: pi.h:152
cl::sycl::info::partition_property::partition_equally
@ partition_equally
PI_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE
@ PI_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE
Definition: pi.h:267
piextDeviceCreateWithNativeHandle
pi_result piextDeviceCreateWithNativeHandle(pi_native_handle nativeHandle, pi_platform platform, pi_device *device)
Creates PI device object from a native handle.
Definition: pi_esimd_emulator.cpp:822
cl::sycl::detail::get_device_info
Definition: device_info.hpp:101
sycl
Definition: invoke_simd.hpp:68
cl::sycl::detail::device_impl::is_partition_supported
bool is_partition_supported(info::partition_property Prop) const
Check if desired partition property supported by device.
Definition: device_impl.cpp:120
device_impl.hpp
cl::sycl::detail::device_impl::is_host
bool is_host() const
Check if SYCL device is a host device.
Definition: device_impl.hpp:88
cl::sycl::detail::plugin::call_nocheck
RT::PiResult call_nocheck(ArgsT... Args) const
Calls the PiApi, traces the call, and returns the result.
Definition: plugin.hpp:170
cl::sycl::detail::device_impl::get_platform
platform get_platform() const
Get associated SYCL platform.
Definition: device_impl.cpp:105
cl::sycl::detail::device_impl::has_extension
bool has_extension(const std::string &ExtensionName) const
Check SYCL extension support by device.
Definition: device_impl.cpp:109
__SYCL_CHECK_OCL_CODE_NO_EXC
#define __SYCL_CHECK_OCL_CODE_NO_EXC(X)
Definition: common.hpp:182
piextDeviceGetNativeHandle
pi_result piextDeviceGetNativeHandle(pi_device device, pi_native_handle *nativeHandle)
Gets the native handle of a PI device object.
Definition: pi_esimd_emulator.cpp:818
cl::sycl::aspect::cpu
@ cpu
cl::sycl::detail::get_device_info::get
static T get(RT::PiDevice dev, const plugin &Plugin)
Definition: device_info.hpp:102
cl::sycl::info::partition_affinity_domain
partition_affinity_domain
Definition: info_desc.hpp:198
cl::sycl::detail::platform_impl::getPlatformFromPiDevice
static std::shared_ptr< platform_impl > getPlatformFromPiDevice(RT::PiDevice PiDevice, const plugin &Plugin)
Queries the cache for the specified platform based on an input device.
Definition: platform_impl.cpp:60
cl::sycl::detail::device_impl::is_affinity_supported
bool is_affinity_supported(info::partition_affinity_domain AffinityDomain) const
Check if affinity partitioning by specified domain is supported by device.
Definition: device_impl.cpp:87
cl::sycl::aspect::ext_oneapi_native_assert
@ ext_oneapi_native_assert
char
cl::sycl::detail::device_impl::getNative
pi_native_handle getNative() const
Gets the native handle of the SYCL device.
Definition: device_impl.cpp:251
cl::sycl::aspect::ext_oneapi_bfloat16
@ ext_oneapi_bfloat16
cl::sycl::aspect::ext_intel_gpu_hw_threads_per_eu
@ ext_intel_gpu_hw_threads_per_eu
pi_uint32
uint32_t pi_uint32
Definition: pi.h:94
platform_impl.hpp
cl::sycl::aspect::usm_device_allocations
@ usm_device_allocations
cl::sycl::detail::pi::PiDeviceType
::pi_device_type PiDeviceType
Definition: pi.hpp:103
cl::sycl::aspect::fp64
@ fp64
cl::sycl::detail::device_impl::device_impl
device_impl()
Constructs a SYCL device instance as a host device.
Definition: device_impl.cpp:19
cl::sycl::aspect::usm_shared_allocations
@ usm_shared_allocations
cl::sycl::info::partition_property::partition_by_counts
@ partition_by_counts
cl::sycl::detail::plugin::call
void call(ArgsT... Args) const
Calls the API, traces the call, checks the result.
Definition: plugin.hpp:217
cl::sycl::aspect::ext_oneapi_cuda_async_barrier
@ ext_oneapi_cuda_async_barrier
cl::sycl::info::partition_property::partition_by_affinity_domain
@ partition_by_affinity_domain
Device
@ Device
Definition: usm_allocator.hpp:14
piDeviceGetInfo
pi_result piDeviceGetInfo(pi_device device, pi_device_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
Returns requested info for provided native device Return PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT fo...
Definition: pi_esimd_emulator.cpp:591
cl::sycl::aspect::online_compiler
@ online_compiler
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
cl::sycl::aspect::usm_atomic_shared_allocations
@ usm_atomic_shared_allocations
cl::sycl::info::partition_property
partition_property
Definition: info_desc.hpp:191
PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
Definition: pi.h:604
PI_DEVICE_INFO_PARENT_DEVICE
@ PI_DEVICE_INFO_PARENT_DEVICE
Definition: pi.h:246
cl::sycl::aspect::ext_intel_gpu_eu_simd_width
@ ext_intel_gpu_eu_simd_width
cl::sycl::aspect
aspect
Definition: aspects.hpp:15
cl::sycl::detail::device_impl::getDeviceName
std::string getDeviceName() const
Definition: device_impl.cpp:396
cl::sycl::detail::plugin
The plugin class provides a unified interface to the underlying low-level runtimes for the device-agn...
Definition: plugin.hpp:90
piDeviceRelease
pi_result piDeviceRelease(pi_device device)
Definition: pi_esimd_emulator.cpp:581
PI_DEVICE_INFO_UUID
@ PI_DEVICE_INFO_UUID
Definition: pi.h:260
cl::sycl::aspect::custom
@ custom
PI_DEVICE_INFO_PCI_ADDRESS
@ PI_DEVICE_INFO_PCI_ADDRESS
Definition: pi.h:262
cl::sycl::detail::device_impl::is_accelerator
bool is_accelerator() const
Check if device is an accelerator device.
Definition: device_impl.hpp:103
pi_native_handle
uintptr_t pi_native_handle
Definition: pi.h:98
cl::sycl::aspect::fp16
@ fp16
cl::sycl::aspect::online_linker
@ online_linker
cl::sycl::aspect::ext_intel_pci_address
@ ext_intel_pci_address
cl::sycl::detail::device_impl::getHandleRef
RT::PiDevice & getHandleRef()
Get reference to PI device.
Definition: device_impl.hpp:64
cl::sycl::aspect::usm_atomic_host_allocations
@ usm_atomic_host_allocations
PI_EXT_ONEAPI_DEVICE_INFO_CUDA_ASYNC_BARRIER
@ PI_EXT_ONEAPI_DEVICE_INFO_CUDA_ASYNC_BARRIER
Definition: pi.h:283
cl::sycl::detail::PlatformImplPtr
std::shared_ptr< detail::platform_impl > PlatformImplPtr
Definition: context_impl.hpp:30
cl::sycl::platform
Encapsulates a SYCL platform on which kernels may be executed.
Definition: platform.hpp:34
cl::sycl::detail::platform_impl
Definition: platform_impl.hpp:32
PI_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE
@ PI_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE
Definition: pi.h:266
PI_DEVICE_PARTITION_BY_COUNTS_LIST_END
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_BY_COUNTS_LIST_END
Definition: pi.h:602
PI_DEVICE_PARTITION_BY_COUNTS
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_BY_COUNTS
Definition: pi.h:599
cl::sycl::detail::device_impl::getHostDeviceImpl
static std::shared_ptr< device_impl > getHostDeviceImpl()
Gets the single instance of the Host Device.
Definition: device_impl.cpp:385
cl::sycl::errc::invalid
@ invalid
pi_device_type
_pi_device_type pi_device_type
Definition: pi.h:567
cl::sycl::aspect::queue_profiling
@ queue_profiling
cl::sycl::aspect::accelerator
@ accelerator
cl::sycl::exception
Definition: exception.hpp:64
cl::sycl::info::device::usm_shared_allocations
@ usm_shared_allocations
cl::sycl::detail::device_impl::is_cpu
bool is_cpu() const
Check if device is a CPU device.
Definition: device_impl.hpp:93
cl::sycl::aspect::usm_host_allocations
@ usm_host_allocations
PI_DEVICE_INFO_TYPE
@ PI_DEVICE_INFO_TYPE
Definition: pi.h:175
cl::sycl::aspect::ext_intel_max_mem_bandwidth
@ ext_intel_max_mem_bandwidth
cl::sycl::aspect::ext_oneapi_srgb
@ ext_oneapi_srgb
cl::sycl::aspect::ext_intel_gpu_eu_count_per_subslice
@ ext_intel_gpu_eu_count_per_subslice
cl::sycl::detail::device_impl::create_sub_devices
std::vector< device > create_sub_devices(const cl_device_partition_property *Properties, size_t SubDevicesCount) const
Definition: device_impl.cpp:127
cl::sycl::aspect::ext_intel_gpu_slices
@ ext_intel_gpu_slices
PI_DEVICE_INFO_GPU_EU_SIMD_WIDTH
@ PI_DEVICE_INFO_GPU_EU_SIMD_WIDTH
Definition: pi.h:264
cl::sycl::aspect::host
@ host
PI_USM_CONCURRENT_ATOMIC_ACCESS
@ PI_USM_CONCURRENT_ATOMIC_ACCESS
Definition: pi.h:1592
cl::sycl::aspect::atomic64
@ atomic64
pi_device_partition_property
intptr_t pi_device_partition_property
Definition: pi.h:596
_pi_device
PI device mapping to a CUdevice.
Definition: pi_cuda.hpp:82
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12