Function holoscan::inference::allocate_buffers

InferStatus holoscan::inference::allocate_buffers(DataMap &buffers, std::vector<int64_t> &dims, holoinfer_datatype datatype, const std::string &keyname, bool allocate_cuda, int device_id)

Allocate buffer on host and device.

Parameters
  • buffersMap with keyword as model name or tensor name, and value as DataBuffer. The map is populated in this function.

  • dims – Dimension of the allocation

  • datatype – Data type of the buffer

  • keyname – Storage name in the map against the created DataBuffer

  • allocate_cuda – flag to allocate cuda buffer

  • device_id – GPU ID to allocate buffers on

Returns

InferStatus with appropriate code and message

© Copyright 2022-2023, NVIDIA. Last updated on Feb 9, 2024.