Skip to content

Conversation

@hyunback
Copy link
Contributor

@hyunback hyunback commented Oct 30, 2025

Description of the issue(symptom, root-cause, how it was resolved)

The regression was observed in the recent memory reset bugfix PR. The issue is get_dims() failure that occurs when calling the convolution feature in dynamic shape.

Solution:
The fix integrates the logic from the existing get_conv_channel_count() utility to correctly and safely determine the channel dimension of the convolution's input/output under dynamic condition, preventing the dimension access failure.

Reproduction step and snapshot (if applicable. Do not attach for customer model)

E2E

python tools/llm_bench/benchmark.py -m ov-share-05.sclab.intel.com/cv_bench_cache/latest_models_llm/qwen2-vl-7b-instruct/pytorch/ov/OV_FP16-4BIT_DEFAULT -d GPU.1 -mc 1 -ic 256 -n 3 -pf frameworks.ai.openvino.llm.prompts/32_1024/qwen2-vl-7b-instruct.jsonl

Benchmark_app

benchmark_app -d GPU.1 --hint none -nireq 1 -niter 1 -m ov-share-05.sclab.intel.com/cv_bench_cache/latest_models_llm/qwen2-vl-7b-instruct/pytorch/ov/OV_FP16-4BIT_DEFAULT/openvino_vision_embeddings_model.xml -data_shape hidden_states[1,1176]

Checklist

  • Is it a proper fix? Yes
  • Did you include test case for this fix, if necessary?
  • Did you review existing test that can be extended to cover this scenario? Which test did you review? mem_reset_test.cpp

Tickets:

The regression was observed in the recent memory reset bugfix PR.
The issue is get_dims() failure that occurs when calling the convolution feature in dynamic shape.

Solution:
The fix integrates the logic from the existing get_conv_channel_count() utility to correctly
and safely determine the channel dimension of the convolution's input/output
under dynamic condition, preventing the dimension access failure.

Signed-off-by: hyunback <[email protected]>
@hyunback hyunback requested review from a team as code owners October 30, 2025 09:59
@hyunback hyunback added category: GPU OpenVINO GPU plugin WIP work in progress under_perf_check labels Oct 30, 2025
@hyunback hyunback changed the title [GPU] Fix Qwen2VL7BInstructInt4 failure. [GPU] Fix access dimension error in dynamic shape Oct 30, 2025
@Lyamin-Roman
Copy link
Contributor

Looks like this is a fix for the same problem #32601

@hyunback hyunback removed the WIP work in progress label Oct 31, 2025
// If the channel count is dynamic, we cannot verify feature alignment,
// so we conservatively skip the reset and return false for this condition.
if (in_channel_count == -1)
return false;
Copy link
Contributor

@isanghao isanghao Oct 31, 2025

Choose a reason for hiding this comment

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

I think the conservative behavior here is to reset memory for potential accuracy issue. Do we have a case where this makes difference in performance? If not, let's return true.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, return true is correct. Applied

// if layout is single blocked and feature size is not aligned with the blocking size, need to reset output so that we can guarantee zero-filling
// NOTE: We may improve this logic to avoid reset if we are sure that it is not "corrupted" by other layers.
if (output_layout.feature() % feature_block_size != 0) {
if (in_channel_count % feature_block_size != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

could you add test case in mem_reset_test.cpp?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied

Signed-off-by: hyunback <[email protected]>
Copy link
Contributor

@isanghao isanghao left a comment

Choose a reason for hiding this comment

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

LGTM

@geunhwan geunhwan added this to the 2025.4 milestone Nov 3, 2025
@isanghao isanghao added this pull request to the merge queue Nov 3, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 3, 2025
### Description of the issue(symptom, root-cause, how it was resolved)
The regression was observed in the recent memory reset bugfix PR. The
issue is get_dims() failure that occurs when calling the convolution
feature in dynamic shape.

Solution:
The fix integrates the logic from the existing get_conv_channel_count()
utility to correctly and safely determine the channel dimension of the
convolution's input/output under dynamic condition, preventing the
dimension access failure.

#### Reproduction step and snapshot (if applicable. Do not attach for
customer model)
##### E2E
python tools/llm_bench/benchmark.py -m
ov-share-05.sclab.intel.com/cv_bench_cache/latest_models_llm/qwen2-vl-7b-instruct/pytorch/ov/OV_FP16-4BIT_DEFAULT
-d GPU.1 -mc 1 -ic 256 -n 3 -pf
frameworks.ai.openvino.llm.prompts/32_1024/qwen2-vl-7b-instruct.jsonl
###### Benchmark_app
benchmark_app -d GPU.1 --hint none -nireq 1 -niter 1 -m
ov-share-05.sclab.intel.com/cv_bench_cache/latest_models_llm/qwen2-vl-7b-instruct/pytorch/ov/OV_FP16-4BIT_DEFAULT/openvino_vision_embeddings_model.xml
-data_shape hidden_states[1,1176]

#### Checklist 
 - [x] Is it a proper fix? Yes
 - [x] Did you include test case for this fix, if necessary? 
- [x] Did you review existing test that can be extended to cover this
scenario? Which test did you review? mem_reset_test.cpp

### Tickets:
 - *CVS-175613*

---------

Signed-off-by: hyunback <[email protected]>
Merged via the queue into openvinotoolkit:master with commit b4bac1c Nov 3, 2025
187 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: GPU OpenVINO GPU plugin Code Freeze

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants