Skip to content

[GPU] Implement ExperimentalDetectronDetectionOutput operation #11772

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

Merged
merged 8 commits into from
Jun 27, 2022

Conversation

opoluektov-lohika
Copy link

@opoluektov-lohika opoluektov-lohika commented May 31, 2022

Tickets:

  • 58493

@opoluektov-lohika opoluektov-lohika requested a review from a team as a code owner May 31, 2022 15:23
@opoluektov-lohika opoluektov-lohika requested a review from a team May 31, 2022 15:23
@opoluektov-lohika opoluektov-lohika requested review from a team as code owners May 31, 2022 15:23
@opoluektov-lohika
Copy link
Author

Please be aware that this PR is based on the fixes in the C++ reference implementation of the operation!

This PR should be merged first: #10621

@yeonbok yeonbok added category: GPU OpenVINO GPU plugin ExternalPR External contributor labels Jun 1, 2022
@yeonbok yeonbok added this to the 2022.2 milestone Jun 1, 2022
@wilson-seok wilson-seok self-assigned this Jun 2, 2022
@opoluektov-lohika opoluektov-lohika force-pushed the igpu/feature/eddo branch 2 times, most recently from 9115833 to e342b29 Compare June 8, 2022 21:25
@wilson-seok
Copy link
Contributor

@opoluektov-lohika Please resolve the confliction.

@opoluektov-lohika
Copy link
Author

@wilson-seok Rebased on the latest master

@@ -203,7 +203,7 @@ void nms_cf(const float* conf_data,

template <typename T>
bool SortScorePairDescend(const std::pair<float, T>& pair1, const std::pair<float, T>& pair2) {
return pair1.first > pair2.first;
return pair1.first > pair2.first || (pair1.first == pair2.first && pair1.second.second < pair2.second.second);
Copy link
Contributor

Choose a reason for hiding this comment

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

Use (), Ex, (pair1.first > pair2.first)

Copy link
Author

Choose a reason for hiding this comment

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

Done

static bool SortScorePairDescend(const std::pair<float, T>& pair1, const std::pair<float, T>& pair2) {
return pair1.first > pair2.first;
static bool SortScorePairDescend(const std::pair<float, std::pair<int, int>>& pair1, const std::pair<float, std::pair<int, int>>& pair2) {
return pair1.first > pair2.first || (pair1.first == pair2.first && pair1.second.second < pair2.second.second);
Copy link
Contributor

Choose a reason for hiding this comment

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

Use (), Ex, (pair1.first > pair2.first)

Copy link
Author

Choose a reason for hiding this comment

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

Done

size_t max_detections_per_image;
bool class_agnostic_box_regression;
float max_delta_log_wh;
std::vector<float> deltas_weights;
Copy link
Contributor

Choose a reason for hiding this comment

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

Add enough comments for @param and @brief

Copy link
Author

Choose a reason for hiding this comment

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

Done

float nms_threshold,
int64_t num_classes,
int64_t post_nms_count,
size_t max_detections_per_image,
Copy link
Contributor

Choose a reason for hiding this comment

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

Any special reason to use big sized int like int64_t and size_t? I think int32_t is enough.

Copy link
Author

Choose a reason for hiding this comment

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

Mainly I was just using the same types as in the operation.

Changed to use int

inputs[2],
inputs[3],
inputs[4], // output classes
inputs[5], // output scores
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to check inputs size is 6 at some point.

Copy link
Author

Choose a reason for hiding this comment

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

Done


const std::vector<ov::test::ElementType> netPrecisions = {
ov::element::Type_t::f16,
ov::element::Type_t::f32,
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add type i32 and i64 because the kernel supports them.

Copy link
Author

Choose a reason for hiding this comment

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

If I do that, the test tries to instantiate the operation with int32/int64 boxes/deltas/scores/image_info, which is not supported, so the test fails with the following message:

.../src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp:94: Failure

.../src/plugins/intel_gpu/src/plugin/program.cpp:354 cldnn program build failed! Node which is about to be added in between two other nodes should not have any existing dependencies

Shall I investigate?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think input precision of the op is any floating type as document. So f32/f16 seems to be ok for the single layer test.

@opoluektov-lohika opoluektov-lohika force-pushed the igpu/feature/eddo branch 2 times, most recently from 482a4a2 to 738de0d Compare June 20, 2022 03:23
@opoluektov-lohika opoluektov-lohika requested review from kelvinchoi-intel and removed request for a team June 21, 2022 13:59

constexpr int kOutputIdx = 0;

constexpr int kRoiCountScalarIdx = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Build error happened in build_linux_android_x64. Please fix it.
image

Copy link
Author

Choose a reason for hiding this comment

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

The build error in build_linux_android_x64 is fixed.

@opoluektov-lohika opoluektov-lohika force-pushed the igpu/feature/eddo branch 2 times, most recently from fe69477 to 216fcb1 Compare June 22, 2022 18:48
Copy link
Contributor

@wilson-seok wilson-seok left a comment

Choose a reason for hiding this comment

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

LGTM

@wilson-seok
Copy link
Contributor

@opoluektov-lohika Please rebase to the latest master to solve issue of whells_windows_vs2019_release.

@yeonbok yeonbok merged commit 8a21e4e into openvinotoolkit:master Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: GPU OpenVINO GPU plugin ExternalPR External contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants