namespace InferenceEngine::gpu

Overview

namespace gpu {

// classes

class ClBlob;
class ClBufferBlob;
class ClContext;
class ClImage2DBlob;
class D3DBufferBlob;
class D3DContext;
class D3DSurface2DBlob;
class USMBlob;
class VAContext;
class VASurfaceBlob;

// global functions

static INFERENCE_ENGINE_1_0_DEPRECATED D3DContext::Ptr make_shared_context(
    Core& core,
    std::string deviceName,
    ID3D11Device \* device,
    int target_tile_id = -1
    );

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    ID3D11Buffer \* buffer
    );

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    ID3D11Texture2D \* surface,
    uint32_t plane = 0
    );

static INFERENCE_ENGINE_1_0_DEPRECATED RemoteContext::Ptr make_shared_context(
    Core& core,
    std::string deviceName,
    cl_context ctx,
    int target_tile_id = -1
    );

static INFERENCE_ENGINE_1_0_DEPRECATED RemoteContext::Ptr make_shared_context(
    Core& core,
    std::string deviceName,
    cl_command_queue queue
    );

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    ClContext::Ptr ctx
    );

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    cl::Buffer& buffer
    );

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    cl_mem buffer
    );

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    cl::Image2D& image
    );

static INFERENCE_ENGINE_1_0_DEPRECATED VAContext::Ptr make_shared_context(
    Core& core,
    std::string deviceName,
    VADisplay device,
    int target_tile_id = -1
    );

static INFERENCE_ENGINE_1_0_DEPRECATED VASurfaceBlob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    VASurfaceID surface,
    uint32_t plane = 0
    );

} // namespace gpu

Detailed Documentation

Global Functions

static INFERENCE_ENGINE_1_0_DEPRECATED D3DContext::Ptr make_shared_context(
    Core& core,
    std::string deviceName,
    ID3D11Device \* device,
    int target_tile_id = -1
    )

This function is used to obtain remote context object from ID3D11Device.

Parameters:

core

Inference Engine Core object instance

deviceName

A name of to create a remote context for

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

Returns:

A shared remote context instance

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    ID3D11Buffer \* buffer
    )

This function is used to obtain remote blob object from ID3D11Buffer.

Parameters:

desc

A tensor description which describes blob configuration

ctx

A shared pointer to a remote context

buffer

A pointer to ID3D11Buffer instance to create remote blob based on

Returns:

A remote blob instance

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    ID3D11Texture2D \* surface,
    uint32_t plane = 0
    )

This function is used to obtain remote blob object from ID3D11Texture2D.

The underlying ID3D11Texture2D can also be a plane of output surface of DXGI video decoder

Parameters:

desc

Tensor description

ctx

the RemoteContext object whuch owns context for the blob to be created

surface

Pointer to ID3D11Texture2D interface of the objects that owns NV12 texture

plane

ID of the plane to be shared (0 or 1)

Returns:

Smart pointer to created RemoteBlob object cast to base class

static INFERENCE_ENGINE_1_0_DEPRECATED RemoteContext::Ptr make_shared_context(
    Core& core,
    std::string deviceName,
    cl_context ctx,
    int target_tile_id = -1
    )

This function is used to obtain remote context object from user-supplied OpenCL context handle.

Parameters:

core

A reference to Inference Engine Core object

deviceName

A name of device to create a remote context for

ctx

A OpenCL context to be used to create shared 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

Returns:

A shared remote context instance

static INFERENCE_ENGINE_1_0_DEPRECATED RemoteContext::Ptr make_shared_context(
    Core& core,
    std::string deviceName,
    cl_command_queue queue
    )

This function is used to obtain remote context object from user-supplied OpenCL context handle.

Only latency mode is supported for such context sharing case.

Parameters:

core

A reference to Inference Engine Core object

deviceName

A name of device to create a remote context for

queue

An OpenCL queue to be used to create shared remote context. Queue will be reused inside the plugin.

Returns:

A shared remote context instance

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    ClContext::Ptr ctx
    )

This function is used to create remote blob object within default GPU plugin OpenCL context.

Parameters:

desc

A tensor descriptor object representing remote blob configuration

ctx

A remote context used to create remote blob

Returns:

A remote blob instance

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    cl::Buffer& buffer
    )

This function is used to obtain remote blob object from user-supplied cl::Buffer wrapper object.

Parameters:

desc

A tensor descriptor object representing remote blob configuration

ctx

A remote context used to create remote blob

buffer

A cl::Buffer object wrapped by a remote blob

Returns:

A remote blob instance

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    cl_mem buffer
    )

This function is used to obtain remote blob object from user-supplied OpenCL buffer handle.

Parameters:

desc

A tensor descriptor object representing remote blob configuration

ctx

A remote context used to create remote blob

buffer

A cl_mem object wrapped by a remote blob

Returns:

A remote blob instance

static INFERENCE_ENGINE_1_0_DEPRECATED Blob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    cl::Image2D& image
    )

This function is used to obtain remote blob object from user-supplied cl::Image2D wrapper object.

Parameters:

desc

A tensor descriptor object representing remote blob configuration

ctx

A remote context used to create remote blob

image

A cl::Image2D object wrapped by a remote blob

Returns:

A remote blob instance

static INFERENCE_ENGINE_1_0_DEPRECATED VAContext::Ptr make_shared_context(
    Core& core,
    std::string deviceName,
    VADisplay device,
    int target_tile_id = -1
    )

This function is used to obtain remote context object from VA display handle.

Parameters:

core

Inference Engine Core object

deviceName

A device name to create a remote context for

device

A VADisplay to create remote context from

target_tile_id

Desired tile id within given context for multi-tile system. Default value (-1) means that root device should be used

Returns:

A remote context wrapping VADisplay

static INFERENCE_ENGINE_1_0_DEPRECATED VASurfaceBlob::Ptr make_shared_blob(
    const TensorDesc& desc,
    RemoteContext::Ptr ctx,
    VASurfaceID surface,
    uint32_t plane = 0
    )

This function is used to obtain remote blob object from VA surface handle.

Parameters:

desc

Tensor descriptor

ctx

A remote context instance

surface

A VASurfaceID to create remote blob from

plane

An index of a plane inside VASurfaceID to create blob from

Returns:

A remote blob wrapping VASurfaceID