Convert (or copy) cuda simple array to VPIImage

I have checked all the sample codes of VPI and in all of them, the image is read using opencv, converted to grayscale and then wrapped by a VPI array. However, for my application, I have my images as Cuda allocated “unsigned char*” on the device memory (no opencv, no cpu array) and they are color images, so my question is how should I transfer the data from my gpu array to VPIImage?

Here is the code I am seeking:

unsigned char * inp_img;
cudaMalloc((void**)&inp_img, array_size* sizeof(unsigned char));
// * some code to fill the inp_img (no problem here)

VPIImage v_image;
/*
Transfer inp_img to v_image...

What must happen here?
*/

vpiSubmitGaussianFilter(stream, backend, v_image, output, 7, 7, 1.7, 1.7, VPI_BORDER_ZERO);
// I took care of output and stream, no problem here
// Rest of the code...

I have tried to use cudaMemcpy2D but it wasn’t successful since I couldn’t access the v_image data pointer.
Thank you in advance.