-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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]: SearchSorted basic implementation. #27356
base: master
Are you sure you want to change the base?
[GPU]: SearchSorted basic implementation. #27356
Conversation
…ment. Added more tests.
#define CMP < | ||
#endif | ||
|
||
OUTPUT_TYPE binary_search_thread(const INPUT0_TYPE search_val, |
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 use FUNC() and FUNC_CALL() wrappers for functions to guarantee unique function names
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.
Fixed.
attach_search_sorted_impl::attach_search_sorted_impl() { | ||
#define ADD_TYPE(type) std::make_tuple(data_types::type, format::bfyx), std::make_tuple(data_types::type, format::bfzyx) | ||
|
||
implementation_map<search_sorted>::add(impl_types::ocl, |
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.
nit: could you please align these definitions with other implementations? Something like:
auto types = {
data_types::f32,
...
};
auto formats = {
format::bfyx,
format::bfzyx
};
implementation_map<search_sorted>::add(impl_types::ocl, shape_types::any, search_sorted_impl::create, types, formats);
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.
Fixed.
validate_inputs_count(op, {2}); | ||
auto inputs = p.GetInputInfo(op); | ||
auto roi_align_prim = cldnn::search_sorted(layer_type_name_ID(op), inputs[0], inputs[1], op->get_right_mode()); | ||
p.add_primitive(*op, roi_align_prim); |
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.
As you are using impl_param.desc->output_data_types[0].value_or(data_types::i64);
for shape inference, output_data_types have to be specified during primitive creation:
p.add_primitive(*op, roi_align_prim); | |
p.add_primitive(*op, roi_align_prim); | |
p.output_data_types = get_output_data_types(op); |
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.
Fixed, but if it "has to be specified", why did it work before?(unit tests, func tests)???
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 core part
Added GPU reference Search Sorted implementation will unit and func tests. Kernel supports dynamic shapes.
Details:
Tickets: