Class ov::intel_gpu::ocl::D3DContext#
-
class D3DContext : public ov::intel_gpu::ocl::ClContext#
This class represents an abstraction for GPU plugin remote context which is shared with Direct3D 11 device. The plugin object derived from this class can be obtained either with CompiledModel::get_context() or Core::create_context() calls.
Note
User can also obtain OpenCL context handle from this class.
Public Functions
-
inline operator ID3D11Device*()#
ID3D11Device conversion operator for the D3DContext object.
- Returns:
Pointer to underlying ID3D11Device interface
-
inline D3DContext(Core &core, ID3D11Device *device, int target_tile_id = -1)#
Constructs D3DContext remote context object from ID3D11Device.
- Parameters:
core – OpenVINO Runtime Core object instance
device – A pointer to ID3D11Device to be used to create a remote context
target_tile_id – Desired tile id within given context for multi-tile system. Default value (-1) means that root device should be used
-
inline std::pair<D3DSurface2DTensor, D3DSurface2DTensor> create_tensor_nv12(const size_t height, const size_t width, ID3D11Texture2D *nv12_surf)#
This function is used to obtain a NV12 tensor from NV12 DXGI video decoder output. The resulting tensor contains two remote tensors for Y and UV planes of the surface.
- Parameters:
height – Height of Y plane
width – Width of Y plane
nv12_surf – A ID3D11Texture2D instance to create NV12 tensor from
- Returns:
A pair of remote tensors for each plane
-
inline D3DBufferTensor create_tensor(const element::Type type, const Shape &shape, ID3D11Buffer *buffer)#
This function is used to obtain remote tensor object from ID3D11Buffer.
-
inline D3DSurface2DTensor create_tensor(const element::Type type, const Shape &shape, ID3D11Texture2D *surface, uint32_t plane = 0)#
This function is used to obtain remote tensor object from ID3D11Texture2D.
Note
The underlying ID3D11Texture2D can also be a plane of output surface of DXGI video decoder
- Parameters:
- Returns:
D3DSurface2DTensor tensor
-
inline ClBufferTensor create_tensor(const element::Type type, const Shape &shape, const cl_mem buffer)#
This function is used to obtain remote tensor object from user-supplied cl_mem object.
-
inline ClBufferTensor create_tensor(const element::Type type, const Shape &shape, const cl::Buffer &buffer)#
This function is used to obtain remote tensor object from user-supplied cl::Buffer object.
-
inline ClImage2DTensor create_tensor(const element::Type type, const Shape &shape, const cl::Image2D &image)#
This function is used to obtain remote tensor object from user-supplied cl::Image2D object.
Public Static Functions
-
static inline void type_check(const RemoteContext &remote_context)#
Checks that type defined runtime parameters are presented in remote object.
- Parameters:
remote_context – A remote context to check
-
inline operator ID3D11Device*()#