-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[GoodFirstIssue][Core] Created AvgPoolBase #23483
[GoodFirstIssue][Core] Created AvgPoolBase #23483
Conversation
const PadType& auto_pad = op::PadType::EXPLICIT); | ||
|
||
void validate_and_infer_types() override; | ||
bool visit_attributes(AttributeVisitor& visitor) override; |
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 suggest adding a similar method to the MaxPoolBase
class with common attributes for v1, v8 and v14, as I did for AvgPoolBase
For example for MaxPool-8
:
bool MaxPool::visit_attributes(AttributeVisitor& visitor) {
OV_OP_SCOPE(v8_MaxPool_visit_attributes);
visitor.on_attribute("index_element_type", m_index_element_type);
visitor.on_attribute("axis", m_axis);
return util::MaxPoolBase::visit_attributes(visitor);
}
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.
Good idea, let's have it in a separate PR.
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.
Let's also do it in a separate Good First Issue. @Vladislav-Denisov would you like to create one or do you prefer I'd do it?
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.
@p-wysocki Do you mean to create new GoodFirstIssue or only new PR?
I would be glad to create new PR to update MaxPoolBase
implementation 😃
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.
PR - certainly, Good First Issue - if you feel like it you can create one, if not, I'll do it, just let me know. :)
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 can create both a PR and a GoodFirstIssue.
Thanks!
@p-wysocki Hi! Could you review, please? |
void set_rounding_type(op::RoundingType rounding_type) { | ||
m_rounding_type = rounding_type; | ||
} |
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.
@p-wysocki, what if developer set torch
rounding type to v1
version of AvgPool. Do we have check for this?
Do we really need this method for setting rounding
type and what use cases? I think - not. Other setters are also questionable.
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.
This setter can be required form GPU plugin as there is pattern to create op, set required attributes call shape infer (there is no node validation).
This attribute is important to be possible to set it.
The rounding mode is validated and torch
mode should throw error for versions which are not supported. @p-wysocki could you confirm?
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.
That is correct, it's validated here:
openvino/src/core/shape_inference/include/pooling_shape_inference_util.hpp
Lines 70 to 73 in d5b81f1
if (!has_torch_ceil_mode<TOp>()) { | |
const auto is_ceil_torch = op->get_rounding_type() == RoundingType::CEIL_TORCH; | |
NODE_VALIDATION_CHECK(op, !is_ceil_torch, "Rounding CEIL_TORCH is not supported."); | |
} |
const PadType& auto_pad = op::PadType::EXPLICIT); | ||
|
||
void validate_and_infer_types() override; | ||
bool visit_attributes(AttributeVisitor& visitor) override; |
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.
Good idea, let's have it in a separate PR.
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.
Thank you for your contribution!
LGTM, I have no other concerns than the ones from @praasz and @t-jankowski. Please request review once again when they're addressed. :)
const PadType& auto_pad = op::PadType::EXPLICIT); | ||
|
||
void validate_and_infer_types() override; | ||
bool visit_attributes(AttributeVisitor& visitor) override; |
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.
Let's also do it in a separate Good First Issue. @Vladislav-Denisov would you like to create one or do you prefer I'd do it?
void set_rounding_type(op::RoundingType rounding_type) { | ||
m_rounding_type = rounding_type; | ||
} |
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.
That is correct, it's validated here:
openvino/src/core/shape_inference/include/pooling_shape_inference_util.hpp
Lines 70 to 73 in d5b81f1
if (!has_torch_ceil_mode<TOp>()) { | |
const auto is_ceil_torch = op->get_rounding_type() == RoundingType::CEIL_TORCH; | |
NODE_VALIDATION_CHECK(op, !is_ceil_torch, "Rounding CEIL_TORCH is not supported."); | |
} |
…tion constructor params.
…tion constructor params.
62cca0e
to
0fa3244
Compare
…av-Denisov/openvino into feature/core/avgPoolBase
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, thank you for your contribution :)
const PadType& auto_pad = op::PadType::EXPLICIT); | ||
|
||
void validate_and_infer_types() override; | ||
bool visit_attributes(AttributeVisitor& visitor) override; |
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.
PR - certainly, Good First Issue - if you feel like it you can create one, if not, I'll do it, just let me know. :)
build_jenkins |
please correct formatting to pass clang tests :) |
build_jenkins |
build_jenkins |
your first PR for OV has been merged @Vladislav-Deniso, congrats and thank you for support! |
### Details: - *Created `AvgPoolBase` class with the common functionality from `AvgPool-1` and `AvgPool-14`* ### Tickets: - *openvinotoolkit#23465
### Details: - *Created `AvgPoolBase` class with the common functionality from `AvgPool-1` and `AvgPool-14`* ### Tickets: - *openvinotoolkit#23465
Details:
AvgPoolBase
class with the common functionality fromAvgPool-1
andAvgPool-14
Tickets:
AvgPool-14
andAvgPool-1
by implementingAvgPoolBase
#23465