-
Notifications
You must be signed in to change notification settings - Fork 157
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-micro] Fix training configure tool UB #14406
[onert-micro] Fix training configure tool UB #14406
Conversation
9111592
to
c7259a1
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! Thank you!
This commit fixes undefined behavior in training configure tool. ONE-DCO-1.0-Signed-off-by: Vyacheslav Bazhenov <[email protected]>
c7259a1
to
71aa892
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, thank you!
@@ -32,7 +32,7 @@ void writeTrainConfigFileDataIntoBuffer( | |||
const auto &train_op_indexes_with_ranks = train_data.trainable_op_indexes_with_ranks; | |||
|
|||
// Resize to calculated size | |||
auto buffer_size = 8 + train_op_indexes_with_ranks.size() * 2; | |||
auto buffer_size = 8 + train_op_indexes_with_ranks.size() * 3; |
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.
Could add some comment, please, for explanation of this calculation
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!
This commit fixes undefined behavior in training configure tool.
ONE-DCO-1.0-Signed-off-by: Vyacheslav Bazhenov [email protected]