#include <detail/kernel_impl.hpp>
Public Member Functions | |
kernel_impl (sycl::detail::pi::PiKernel Kernel, ContextImplPtr Context, KernelBundleImplPtr KernelBundleImpl, const KernelArgMask *ArgMask=nullptr) | |
Constructs a SYCL kernel instance from a PiKernel. More... | |
kernel_impl (sycl::detail::pi::PiKernel Kernel, ContextImplPtr ContextImpl, ProgramImplPtr ProgramImpl, bool IsCreatedFromSource, KernelBundleImplPtr KernelBundleImpl, const KernelArgMask *ArgMask) | |
Constructs a SYCL kernel instance from a SYCL program and a PiKernel. More... | |
kernel_impl (sycl::detail::pi::PiKernel Kernel, ContextImplPtr ContextImpl, DeviceImageImplPtr DeviceImageImpl, KernelBundleImplPtr KernelBundleImpl, const KernelArgMask *ArgMask, PiProgram ProgramPI, std::mutex *CacheMutex) | |
Constructs a SYCL kernel_impl instance from a SYCL device_image, kernel_bundle and / PiKernel. More... | |
kernel_impl (ContextImplPtr Context, ProgramImplPtr ProgramImpl) | |
Constructs a SYCL kernel for host device. More... | |
kernel_impl (const kernel_impl &)=delete | |
kernel_impl (kernel_impl &&)=delete | |
kernel_impl & | operator= (const kernel_impl &)=delete |
kernel_impl & | operator= (kernel_impl &&)=delete |
~kernel_impl () | |
cl_kernel | get () const |
Gets a valid OpenCL kernel handle. More... | |
bool | is_host () const |
Check if the associated SYCL context is a SYCL host context. More... | |
const PluginPtr & | getPlugin () const |
template<typename Param > | |
Param::return_type | get_info () const |
Query information from the kernel object using the info::kernel_info descriptor. More... | |
template<typename Param > | |
Param::return_type | get_info (const device &Device) const |
Query device-specific information from a kernel object using the info::kernel_device_specific descriptor. More... | |
template<typename Param > | |
Param::return_type | get_info (const device &Device, const range< 3 > &WGSize) const |
Query device-specific information from a kernel using the info::kernel_device_specific descriptor for a specific device and value. More... | |
template<typename Param > | |
Param::return_type | ext_oneapi_get_info (const queue &q) const |
sycl::detail::pi::PiKernel & | getHandleRef () |
Get a reference to a raw kernel object. More... | |
const sycl::detail::pi::PiKernel & | getHandleRef () const |
Get a constant reference to a raw kernel object. More... | |
bool | isCreatedFromSource () const |
Check if kernel was created from a program that had been created from source. More... | |
const DeviceImageImplPtr & | getDeviceImage () const |
pi_native_handle | getNative () const |
KernelBundleImplPtr | get_kernel_bundle () const |
bool | isInterop () const |
PiProgram | getProgramRef () const |
ContextImplPtr | getContextImplPtr () const |
std::mutex & | getNoncacheableEnqueueMutex () |
const KernelArgMask * | getKernelArgMask () const |
std::mutex * | getCacheMutex () const |
template<typename Param > | |
Param::return_type | get_info (const device &Device, const sycl::range< 3 > &WGSize) const |
Definition at line 36 of file kernel_impl.hpp.
sycl::_V1::detail::kernel_impl::kernel_impl | ( | sycl::detail::pi::PiKernel | Kernel, |
ContextImplPtr | Context, | ||
KernelBundleImplPtr | KernelBundleImpl, | ||
const KernelArgMask * | ArgMask = nullptr |
||
) |
Constructs a SYCL kernel instance from a PiKernel.
This constructor is used for plug-in interoperability. It always marks kernel as being created from source and creates a new program_impl instance.
Kernel | is a valid PiKernel instance |
Context | is a valid SYCL context |
KernelBundleImpl | is a valid instance of kernel_bundle_impl |
Definition at line 20 of file kernel_impl.cpp.
References getPlugin(), PI_TRUE, PI_USM_INDIRECT_ACCESS, and piKernelSetExecInfo().
sycl::_V1::detail::kernel_impl::kernel_impl | ( | sycl::detail::pi::PiKernel | Kernel, |
ContextImplPtr | ContextImpl, | ||
ProgramImplPtr | ProgramImpl, | ||
bool | IsCreatedFromSource, | ||
KernelBundleImplPtr | KernelBundleImpl, | ||
const KernelArgMask * | ArgMask | ||
) |
Constructs a SYCL kernel instance from a SYCL program and a PiKernel.
This constructor creates a new instance from PiKernel and saves the provided SYCL program. If context of PiKernel differs from context of the SYCL program, an invalid_parameter_error exception is thrown.
Kernel | is a valid PiKernel instance |
ContextImpl | is a valid SYCL context |
ProgramImpl | is a valid instance of program_impl |
IsCreatedFromSource | is a flag that indicates whether program is created from source code |
KernelBundleImpl | is a valid instance of kernel_bundle_impl |
Definition at line 38 of file kernel_impl.cpp.
References getPlugin(), PI_KERNEL_INFO_CONTEXT, and piKernelGetInfo().
sycl::_V1::detail::kernel_impl::kernel_impl | ( | sycl::detail::pi::PiKernel | Kernel, |
ContextImplPtr | ContextImpl, | ||
DeviceImageImplPtr | DeviceImageImpl, | ||
KernelBundleImplPtr | KernelBundleImpl, | ||
const KernelArgMask * | ArgMask, | ||
PiProgram | ProgramPI, | ||
std::mutex * | CacheMutex | ||
) |
Constructs a SYCL kernel_impl instance from a SYCL device_image, kernel_bundle and / PiKernel.
Kernel | is a valid PiKernel instance |
ContextImpl | is a valid SYCL context |
KernelBundleImpl | is a valid instance of kernel_bundle_impl |
Definition at line 61 of file kernel_impl.cpp.
sycl::_V1::detail::kernel_impl::kernel_impl | ( | ContextImplPtr | Context, |
ProgramImplPtr | ProgramImpl | ||
) |
Constructs a SYCL kernel for host device.
Context | is a valid SYCL context |
ProgramImpl | is a valid instance of program_impl |
Definition at line 74 of file kernel_impl.cpp.
|
delete |
|
delete |
sycl::_V1::detail::kernel_impl::~kernel_impl | ( | ) |
Definition at line 77 of file kernel_impl.cpp.
References getPlugin(), is_host(), and piKernelRelease().
Param::return_type sycl::_V1::detail::kernel_impl::ext_oneapi_get_info | ( | const queue & | q | ) | const |
|
inline |
Gets a valid OpenCL kernel handle.
If this kernel encapsulates an instance of OpenCL kernel, a valid cl_kernel will be returned. If this kernel is a host kernel, an invalid_object_error exception will be thrown.
Definition at line 105 of file kernel_impl.hpp.
References getPlugin(), is_host(), and piKernelRetain().
|
inline |
Query information from the kernel object using the info::kernel_info descriptor.
Definition at line 211 of file kernel_impl.hpp.
References getHandleRef(), getPlugin(), and is_host().
|
inline |
Query device-specific information from a kernel object using the info::kernel_device_specific descriptor.
Device | is a valid SYCL device to query info for. |
Definition at line 232 of file kernel_impl.hpp.
References sycl::_V1::info::custom, sycl::_V1::device::get_info(), getHandleRef(), getPlugin(), sycl::_V1::detail::getSyclObjImpl(), sycl::_V1::invalid, and is_host().
Param::return_type sycl::_V1::detail::kernel_impl::get_info | ( | const device & | Device, |
const range< 3 > & | WGSize | ||
) | const |
Query device-specific information from a kernel using the info::kernel_device_specific descriptor for a specific device and value.
max_sub_group_size is the only valid descriptor for this function.
Device | is a valid SYCL device. |
WGSize | is the work-group size the sub-group size is requested for. |
|
inline |
Definition at line 255 of file kernel_impl.hpp.
References getHandleRef(), getPlugin(), sycl::_V1::detail::getSyclObjImpl(), and is_host().
|
inline |
Definition at line 180 of file kernel_impl.hpp.
|
inline |
Definition at line 192 of file kernel_impl.hpp.
|
inline |
Definition at line 185 of file kernel_impl.hpp.
|
inline |
Definition at line 166 of file kernel_impl.hpp.
|
inline |
Get a reference to a raw kernel object.
Definition at line 153 of file kernel_impl.hpp.
Referenced by get_info().
|
inline |
Get a constant reference to a raw kernel object.
Definition at line 158 of file kernel_impl.hpp.
|
inline |
Definition at line 191 of file kernel_impl.hpp.
|
inline |
Definition at line 168 of file kernel_impl.hpp.
References sycl::_V1::opencl, piextKernelGetNativeHandle(), and piKernelRetain().
|
inline |
Definition at line 187 of file kernel_impl.hpp.
|
inline |
Definition at line 120 of file kernel_impl.hpp.
Referenced by get(), get_info(), kernel_impl(), and ~kernel_impl().
|
inline |
Definition at line 184 of file kernel_impl.hpp.
|
inline |
Check if the associated SYCL context is a SYCL host context.
Definition at line 118 of file kernel_impl.hpp.
Referenced by get(), get_info(), and ~kernel_impl().
bool sycl::_V1::detail::kernel_impl::isCreatedFromSource | ( | ) | const |
Check if kernel was created from a program that had been created from source.
Definition at line 84 of file kernel_impl.cpp.
|
inline |
Definition at line 182 of file kernel_impl.hpp.
|
delete |
|
delete |