Skip to content
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

Merged
merged 4 commits into from
Jan 29, 2024

Conversation

YongseopKim
Copy link
Contributor

This commit adds PadLayer op to train backend.

ONE-DCO-1.0-Signed-off-by: Yongseop Kim [email protected]


for #12413
draft #12499

This commit adds PadLayer op to train backend.

ONE-DCO-1.0-Signed-off-by: Yongseop Kim <[email protected]>
@YongseopKim YongseopKim requested review from jyoungyun and a team January 26, 2024 06:25
@YongseopKim
Copy link
Contributor Author

PTAL @jyoungyun and @Samsung/one_onert

@zetwhite zetwhite requested a review from a team January 26, 2024 07:35
zetwhite
zetwhite previously approved these changes Jan 29, 2024
Copy link
Contributor

@zetwhite zetwhite left a 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
Copy link
Contributor

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.

Copy link
Contributor Author

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!

@YongseopKim
Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary?

Copy link
Contributor Author

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.

@YongseopKim
Copy link
Contributor Author

PTAL all

Copy link
Contributor

@ragmani ragmani left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@zetwhite zetwhite left a comment

Choose a reason for hiding this comment

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

LGTM 💯

Copy link
Contributor

@jyoungyun jyoungyun left a 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>();
Copy link
Contributor

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>();
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto. 👍

@chunseoklee chunseoklee merged commit 7364f8c into Samsung:master Jan 29, 2024
9 checks passed
@YongseopKim YongseopKim deleted the pr/backend/train/ops/PadLayer branch February 1, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants