Skip to content

Conversation

yunowo
Copy link
Member

@yunowo yunowo commented Sep 12, 2025

Description

Enabled memory mapper for gvagenai so it supports VAMemory, VASurface, DMABuf frames now.
Add support for prompt-path.

Any Newly Introduced Dependencies

None

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

  • I agree to use the APACHE-2.0 license for my code changes.
  • I have not introduced any 3rd party components incompatible with APACHE-2.0.
  • I have not included any company confidential information, trade secret, password or security token.
  • I have performed a self-review of my code.

@yunowo yunowo changed the title [DLStreamer] gvagenai: enable memory mapper [DLStreamer] gvagenai: enable memory mapper, add support for prompt-path Sep 15, 2025
auto gst_frame = std::make_shared<dlstreamer::GSTFrame>(buffer, info);
auto mapped_frame = mapper->map(gst_frame, dlstreamer::AccessMode::Read);

// Convert to Mat, code from gvawatermark
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conversion of VAMemory / DMABuf to OpenCV Mat will involve memory copy.
Please add support for remote tensors instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RemoteTensor is not supported. See CVS-160602

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is GPU memory not supported at all, or the limitation is lack of ov::preprocessor in genai front-end?
We should be able to generate RGB or BGR images in VAMemory, and create tensor wrappers around.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both. VAAPI surface doesn't support 24 bits RGB or BGR, only supports 32 bits RGBA or BGRA.
For GenAI, the image encoding (preprocessing) handles the data on CPU. See classes.cpp llava_image_embed_make_with_bytes_slice and resample functions.
Also the VLMPipeline class doesn't expose RemoteContext, also RemoteContext cannot be passed into VLMPipeline, so no way to create a RemoteTensor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants