Skip to content

Conversation

@mateusztabaka
Copy link

No description provided.

@github-actions github-actions bot added the category: visual language Visual language pipeline label Nov 25, 2025
std::vector<std::variant<ov::Tensor, size_t>> drop_image_placeholders(const ov::Tensor& tokens) {
std::vector<std::variant<ov::Tensor, size_t>> drop_image_placeholders(int64_t* tokens, const ov::Shape& shape) {
std::vector<std::variant<ov::Tensor, size_t>> chunks;
int64_t last_token = tokens.data<int64_t>()[0];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a way to use const version of data()? The underlying memory isn't affected.

@sgonorov, please update your PR to include the fix if it's truly needed #3026

@mateusztabaka, as you can see I'm leaving it to @sgonorov. Let us know if you aren't OK with that

Copy link
Author

Choose a reason for hiding this comment

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

Is there a way to use const version of data()? The underlying memory isn't affected.

Yes, however non-const pointer has to be passed to ov::Tensor constructor to make it work.

@mateusztabaka, as you can see I'm leaving it to @sgonorov. Let us know if you aren't OK with that

I'm fine with that. @sgonorov let me know when you pull my change so I can test your branch then.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in PR: #3072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: visual language Visual language pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants