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-micro] Add execute part #12629

Merged

Conversation

BalyshevArtem
Copy link
Contributor

This pr adds execute entities part to the onert-micro.

from draft #12426
for issue: #12427

ONE-DCO-1.0-Signed-off-by: Artem Balyshev [email protected]

This pr adds execute entities part to the onert-micro

ONE-DCO-1.0-Signed-off-by: Artem Balyshev <[email protected]>
float max_abs_error = 1.0e-5f);

template <typename T, typename U = T>
std::vector<U> checkSISOKernel(onert_micro::test_model::TestDataBase<T, U> *test_data_base)
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps it would be better to combine the verification of kernels with one or two inputs (checkSISOKernel and checkTISOKernel) into one template function with a choice of the number of inputs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for review! Yes, I agree, I moved this num of imputs as a functions checkKernel argument


assert(input_product_scale >= 0);

return input_product_scale / static_cast<double>(output_scale);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to check this line for division by zero (output_scale)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thank you

int32_t *activation_max)
{
auto quantize = [scale, zero_point](float x) {
return zero_point + static_cast<int32_t>(std::round(x / scale));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to check this line for division by zero (scale)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thank you

SlavikMIPT
SlavikMIPT previously approved these changes Feb 15, 2024
Copy link
Contributor

@SlavikMIPT SlavikMIPT 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

@Torrero Torrero left a comment

Choose a reason for hiding this comment

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

LGTM

@BalyshevArtem BalyshevArtem merged commit a986f01 into Samsung:master Feb 15, 2024
4 checks passed
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.

3 participants