-
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-micro] Add execute part #12629
[onert-micro] Add execute part #12629
Conversation
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) |
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.
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
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 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); |
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 think it would be better to check this line for division by zero (output_scale)
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.
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)); |
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 think it would be better to check this line for division by zero (scale)
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.
Done, thank you
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
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]