-
Notifications
You must be signed in to change notification settings - Fork 159
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
[onert/train] Add PadLayer op to train backend #12535
[onert/train] Add PadLayer op to train backend #12535
Conversation
This commit adds PadLayer op to train backend. ONE-DCO-1.0-Signed-off-by: Yongseop Kim <[email protected]>
PTAL @jyoungyun and @Samsung/one_onert |
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 👍
|
||
// Note, this is pad with mode=`CONSTANT`: it doesn't support `REFLECT` and | ||
// `SYMMETRIC` | ||
class PadLayer : public ::onert::exec::train::ITrainableFunction |
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.
(Q) Is there any reason why you didn't inherit the PadLayer function of cpu kernel? If you inherit PadLayer from cpu, we can share private members and several functions including configure
and run
functions.
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's a great point. Now I figure out!
PTAL all |
@@ -35,6 +35,7 @@ using cpu::ops::getShape; | |||
using cpu::ops::getNumberOfDimensions; | |||
using cpu::ops::getNumberOfElements; | |||
using cpu::ops::getSizeOfDimension; | |||
using cpu::ops::ConstDataPtr; |
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.
Is this necessary?
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.
Oops. You're right. I'll fix it.
PTAL all |
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
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 💯
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
depad<float>(); | ||
break; | ||
case OperandType::QUANT_UINT8_ASYMM: | ||
depad<uint8_t>(); |
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.
👍
depad<uint8_t>(); | ||
break; | ||
case OperandType::QUANT_INT8_ASYMM: | ||
depad<int8_t>(); |
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.
ditto. 👍
This commit adds PadLayer op to train backend.
ONE-DCO-1.0-Signed-off-by: Yongseop Kim [email protected]
for #12413
draft #12499