-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[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
[GPU] Implement ExperimentalDetectronDetectionOutput operation #11772
Conversation
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 |
7458b4d
to
4690f04
Compare
src/plugins/intel_gpu/src/graph/impls/ocl/experimental_detectron_detection_output.cpp
Show resolved
Hide resolved
src/plugins/intel_gpu/src/kernel_selector/common/common_types.h
Outdated
Show resolved
Hide resolved
...nel_selector/core/actual_kernels/eddo/experimental_detectron_detection_output_kernel_ref.cpp
Outdated
Show resolved
Hide resolved
...nel_selector/core/actual_kernels/eddo/experimental_detectron_detection_output_kernel_ref.cpp
Outdated
Show resolved
Hide resolved
...nel_selector/core/actual_kernels/eddo/experimental_detectron_detection_output_kernel_ref.cpp
Outdated
Show resolved
Hide resolved
...ernel_selector/core/actual_kernels/eddo/experimental_detectron_detection_output_kernel_ref.h
Show resolved
Hide resolved
...intel_gpu/src/kernel_selector/core/cl_kernels/experimental_detectron_detection_output_ref.cl
Outdated
Show resolved
Hide resolved
...intel_gpu/src/kernel_selector/core/cl_kernels/experimental_detectron_detection_output_ref.cl
Show resolved
Hide resolved
...intel_gpu/src/kernel_selector/core/cl_kernels/experimental_detectron_detection_output_ref.cl
Outdated
Show resolved
Hide resolved
4690f04
to
2b8d373
Compare
9115833
to
e342b29
Compare
@opoluektov-lohika Please resolve the confliction. |
e342b29
to
a5a3bd1
Compare
@wilson-seok Rebased on the latest master |
...in/gpu/shared_tests_instances/single_layer_tests/experimental_detectron_detection_output.cpp
Outdated
Show resolved
Hide resolved
...in/gpu/shared_tests_instances/single_layer_tests/experimental_detectron_detection_output.cpp
Outdated
Show resolved
Hide resolved
a5a3bd1
to
dd1a89f
Compare
@@ -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); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
dd1a89f
to
64e11ce
Compare
482a4a2
to
738de0d
Compare
|
||
constexpr int kOutputIdx = 0; | ||
|
||
constexpr int kRoiCountScalarIdx = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
fe69477
to
216fcb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@opoluektov-lohika Please rebase to the latest master to solve issue of whells_windows_vs2019_release. |
… stage This is to ensure the operation produces stable predictable results across the possible sorting algorithm implementaions. This property is useful for the operation testing.
…t coverage More attribute permutations were added.
216fcb1
to
bb49151
Compare
Tickets: