Class ov::RemoteTensor#

class RemoteTensor : public ov::Tensor#

Remote memory access and interoperability API.

Subclassed by ov::intel_gpu::ocl::ClBufferTensor, ov::intel_gpu::ocl::ClImage2DTensor, ov::intel_gpu::ocl::USMTensor, ov::intel_npu::level_zero::ZeroBufferTensor

Public Functions

RemoteTensor() = default#

Default constructor.

RemoteTensor(const RemoteTensor &other, const Coordinate &begin, const Coordinate &end)#

Constructs region of interest (ROI) tensor from another remote tensor.

Note

Does not perform memory allocation internally

Note

A Number of dimensions in begin and end must match number of dimensions in other.get_shape()

Parameters:
  • other – original tensor

  • begin – start coordinate of ROI object inside of the original object.

  • end – end coordinate of ROI object inside of the original object.

void *data(const element::Type) = delete#

Access to host memory is not available for RemoteTensor. To access a device-specific memory, cast to a specific RemoteTensor derived object and work with its properties or parse device memory properties via RemoteTensor::get_params.

Returns:

Nothing, throws an exception.

void copy_to(ov::Tensor &dst) const#

Copies data from this RemoteTensor to the specified destination tensor.

Parameters:

dst – The destination tensor to which data will be copied.

void copy_from(const ov::Tensor &src)#

Copies data from the specified source tensor to this RemoteTensor.

Parameters:

src – The source tensor from which data will be copied.

ov::AnyMap get_params() const#

Returns a map of device-specific parameters required for low-level operations with underlying object. Parameters include device/context/surface/buffer handles, access flags, etc. Content of the returned map depends on remote execution context that is currently set on the device (working scenario). Abstract method.

Returns:

A map of name/parameter elements.

Public Static Functions

static void type_check(const Tensor &tensor, const std::map<std::string, std::vector<std::string>> &type_info = {})#

Checks OpenVINO remote type.

Parameters:
  • tensorTensor which type is checked.

  • type_info – Map with remote object runtime info.

Throws:

Exception – if type check with specified parameters failed.