Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GPU] prevent too long sort in experimental detectron generate proposals single image #28422

Merged
merged 11 commits into from
Jan 16, 2025

Conversation

michal-miotk
Copy link
Contributor

@michal-miotk michal-miotk commented Jan 13, 2025

Details:

  • changed quickSortIterative to quickSelectIterative
  • added changing pivot position
  • issue happens on ref kernel when many zeroes on fp16 inference
  • on UHD770 fp32 inference on model instance
    segmentation-security-0010.xml speed up 0.14fps->0.19fps

Tickets:

@michal-miotk michal-miotk requested review from a team as code owners January 13, 2025 23:21
@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Jan 13, 2025
Copy link
Contributor

@dnkurek dnkurek left a comment

Choose a reason for hiding this comment

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

LGTM

@michal-miotk
Copy link
Contributor Author

looks like not fixed issue, still hang in specific case

@michal-miotk
Copy link
Contributor Author

works

@michal-miotk michal-miotk changed the title [GPU] [DRAFT] prevent too long sort when all zeroes [GPU] prevent too long sort in experimental detectron generate proposals single image ref kernel when many zeroes on fp16 Jan 16, 2025
@dnkurek
Copy link
Contributor

dnkurek commented Jan 16, 2025

Commit title is a bit too long. Second part of it should rather be in the description

@michal-miotk michal-miotk changed the title [GPU] prevent too long sort in experimental detectron generate proposals single image ref kernel when many zeroes on fp16 [GPU] prevent too long sort in experimental detectron generate proposals single image Jan 16, 2025
static int static_counter = 0;
static_counter++;
int pivot_idx = l;
if(static_counter%3 == 0) {
Copy link
Contributor

@clee30 clee30 Jan 16, 2025

Choose a reason for hiding this comment

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

Why is 3 here? May be need to define it.

Copy link
Contributor

@dnkurek dnkurek Jan 16, 2025

Choose a reason for hiding this comment

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

Looks to me like a cyclic pivot selection rotation scheme in order to avoid worst case scenario in quicksort

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess that a simple comment may suffice so it's more clear

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@clee30 clee30 left a comment

Choose a reason for hiding this comment

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

LGTM.

@vladimir-paramuzov vladimir-paramuzov added this to the 2025.0 milestone Jan 16, 2025
@michal-miotk
Copy link
Contributor Author

on instance-segmentation-security-0050/FP32/instance-segmentation-security-0050.xml speedup from 1.55fps(0010b3b - ref) to 4.26 FPS [36bab31] , gpu uhd770, infer_precision=f32(ref version crash on f16)

@vladimir-paramuzov vladimir-paramuzov added this pull request to the merge queue Jan 16, 2025
Merged via the queue into openvinotoolkit:master with commit 513dcc5 Jan 16, 2025
167 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.

5 participants