CVCUDA Holoscan Interoperability Operators#
Authors: Holoscan Team (NVIDIA)
Supported platforms: x86_64, aarch64
Language: C++
Last modified: October 9, 2025
Latest version: 1.0
Minimum Holoscan SDK version: 0.6.0
Tested Holoscan SDK versions: 0.6.0
Contribution metric: Level 1 - Highly Reliable
This directory contains two operators to enable interoperability between the CVCUDA and Holoscan
tensors: holoscan::ops::CvCudaToHoloscan and holoscan::ops::HoloscanToCvCuda.
holoscan::ops::CvCudaToHoloscan#
Operator class to convert a nvcv::Tensor to a holoscan::Tensor.
Inputs (CvCudaToHoloscan)#
input: a CV-CUDA tensor- type:
nvcv::Tensor
Outputs (CvCudaToHoloscan)#
output: a Holoscan tensor asholoscan::Tensorinholoscan::TensorMap- type:
holoscan::TensorMap
holoscan::ops::HoloscanToCvCuda#
Operator class to convert Holoscan tensor to CV-CUDA.
Inputs (HoloscanToCvCuda)#
input: agxf::Entitycontaining a Holoscan tensor asholoscan::Tensor- type:
gxf::Entity
Outputs (HoloscanToCvCuda)#
output: a CV-CUDA tensor- type:
nvcv::Tensor
API Reference#
C++#
holoscan::ops::CvCudaToHoloscan#
Inherits from: holoscan::Operator
This operator converts a CVCUDA tensor to a Holoscan tensor. It only works for tensor with less than or equal to 4 dimensions (i.e., rank in CVCUDA tensor). If the batch size or channel size is 1, then those dimensions are dropped in the Holoscan tensor.
Methods#
| Method | Description |
|---|---|
void setup(OperatorSpec &spec) override |
|
void compute(InputContext &, OutputContext &op_output, ExecutionContext &) override |
holoscan::ops::HoloscanToCvCuda#
Inherits from: holoscan::Operator
This operator converts a Holoscan tensor to a CVCUDA tensor. It currently works with tensor dimensions of less than or equal to 4. The tensor also needs to be on the device memory.
Methods#
| Method | Description |
|---|---|
void setup(OperatorSpec &spec) override |
|
void compute(InputContext &, OutputContext &op_output, ExecutionContext &) override |
|
nvcv::Tensor to_cvcuda_NHWC_tensor(std::shared_ptr< holoscan::Tensor > in_tensor, std::shared_ptr< void * > &holoscan_tensor_data) |
This function converts a Holoscan tensor to a CVCUDA tensor in NHWC format. Even if there is no batch dimension, the output tensor will be created in NHWC format. |