-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
LP Transformation tests use API 2.0 #21677
Conversation
...shared/include/low_precision_transformations/concat_with_different_precision_on_children.hpp
Show resolved
Hide resolved
.../plugin/shared/src/low_precision_transformations/concat_with_intermediate_transformation.cpp
Outdated
Show resolved
Hide resolved
src/tests/functional/plugin/shared/src/low_precision_transformations/mat_mul_transformation.cpp
Outdated
Show resolved
Hide resolved
...ional/plugin/shared/src/low_precision_transformations/output_layers_concat_multi_channel.cpp
Outdated
Show resolved
Hide resolved
...sses/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp
Outdated
Show resolved
Hide resolved
...nctional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp
Outdated
Show resolved
Hide resolved
@iefode, note, please, in some test cases we need to set |
src/tests/functional/plugin/shared/src/low_precision_transformations/add_transformation.cpp
Show resolved
Hide resolved
inputShape2[3] = 1; | ||
} | ||
init_input_shapes({ inputShape, inputShape2 }); | ||
|
||
function = ngraph::builder::subgraph::AddFunction::getOriginal( |
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.
Don't use ngraph
. Check similar usage of ngraph
functions in modified files.
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.
@itikhono,
There are helper functions in src/tests/ov_helpers/ov_lpt_models. Should it be fixed ngraph -> ov namespace in this PR or it could be done in next separate PR? There are already 200+ files in this PR
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.
Talked offline. This will be done in a next separate PR since there are already too many files in this PR
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.
created ticket
...l/plugin/shared/src/low_precision_transformations/eliminate_fake_quantize_transformation.cpp
Outdated
Show resolved
Hide resolved
...hared/src/low_precision_transformations/fake_quantize_with_dq_not_optimal_transformation.cpp
Outdated
Show resolved
Hide resolved
...ts/functional/plugin/shared/src/low_precision_transformations/interpolate_transformation.cpp
Outdated
Show resolved
Hide resolved
...nal/plugin/shared/src/low_precision_transformations/mat_mul_with_constant_transformation.cpp
Outdated
Show resolved
Hide resolved
...tests/functional/plugin/shared/src/low_precision_transformations/multiply_transformation.cpp
Outdated
Show resolved
Hide resolved
.../plugin/shared/src/low_precision_transformations/multiply_with_one_parent_transformation.cpp
Outdated
Show resolved
Hide resolved
...functional/plugin/shared/src/low_precision_transformations/recurrent_cell_transformation.cpp
Outdated
Show resolved
Hide resolved
...sts/functional/plugin/shared/src/low_precision_transformations/reduce_max_transformation.cpp
Outdated
Show resolved
Hide resolved
...sses/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp
Outdated
Show resolved
Hide resolved
...nctional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp
Outdated
Show resolved
Hide resolved
...nctional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp
Outdated
Show resolved
Hide resolved
...nctional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp
Outdated
Show resolved
Hide resolved
...nctional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp
Outdated
Show resolved
Hide resolved
src/tests/functional/shared_test_classes/src/base/utils/generate_inputs.cpp
Outdated
Show resolved
Hide resolved
src/tests/functional/shared_test_classes/src/base/utils/generate_inputs.cpp
Outdated
Show resolved
Hide resolved
src/tests/test_utils/common_test_utils/include/common_test_utils/data_utils.hpp
Outdated
Show resolved
Hide resolved
const float min, | ||
const float max, | ||
const int seed) { | ||
std::mt19937 gen(seed); |
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.
Just minor open question: to use such generator for instead of gtest::Random
?
@evkotov Have you checked which generator is using in gtest::Random
?
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.
the main problem to generate within [min, max] range with float min and max. It is simple to get the way I used. gtest::Random operates uint32 range
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.
Minor for the future: unite two functions into one. Because float numbers could be generate by resolution using
97fca4a
to
aa0d490
Compare
src/tests/functional/shared_test_classes/src/base/utils/generate_inputs.cpp
Outdated
Show resolved
Hide resolved
Hi @eshoguli , if you mean, that tests fail in case threshold and max error are equal, this behavior is fixed in PR: #21783 (function less_or_equal in src/tests/test_utils/common_test_utils/src/ov_tensor_utils.cpp ). Also, please, not, that after this PR the meaning of |
8a1cdf5
to
2822678
Compare
.../shared_tests_instances/low_precision_transformations/fuse_subtract_to_fq_transformation.cpp
Outdated
Show resolved
Hide resolved
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.
In general LGTM. I have left several comments for the future.
|
||
static std::pair<float, float> getQuantizationInterval(const ngraph::element::Type precision); | ||
static std::string to_string(const ov::pass::low_precision::LayerTransformation::Params& params); |
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.
Minor: so strange naming... What does it mean?
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.
This looks strange in diff. If you open file you can see that getQuantizationInterval renamed to get_quantization_interval
} | ||
|
||
void LayerTransformation::init_input_shapes(const ov::PartialShape& shape) { | ||
std::pair<ov::PartialShape, std::vector<ov::Shape>> input_shapes(shape, { shape.to_shape() }); |
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 did not get any response to the comment. Why should it be resolved?
const float min, | ||
const float max, | ||
const int seed) { | ||
std::mt19937 gen(seed); |
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.
Minor for the future: unite two functions into one. Because float numbers could be generate by resolution using
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.
No significant comments from my side. You did a great job cleaning out ngraph namespace usage. I'm looking forward for the future clearing of API 1.0 headers and methods.
Please elaborate why some tests are skipped and some tests are given huge tolerance in the description of this PR. It seems like we are losing the coverage just because we are switching namespaces.
Overall, looks ok to me.
...ared_tests_instances/low_precision_transformations/fq_with_dq_not_optimal_transformation.cpp
Outdated
Show resolved
Hide resolved
.../shared_tests_instances/low_precision_transformations/fuse_multiply_to_fq_transformation.cpp
Outdated
Show resolved
Hide resolved
.../shared_tests_instances/low_precision_transformations/fuse_multiply_to_fq_transformation.cpp
Outdated
Show resolved
Hide resolved
.../shared_tests_instances/low_precision_transformations/fuse_subtract_to_fq_transformation.cpp
Outdated
Show resolved
Hide resolved
// threshold = 0.1f; | ||
abs_threshold = 1.0e-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.
is it desirable behavior? did we lose coverage? did we soften the testing?
@@ -31,12 +30,15 @@ std::string ReduceMaxTransformation::getTestCaseName(const testing::TestParamInf | |||
} | |||
|
|||
void ReduceMaxTransformation::SetUp() { | |||
ngraph::element::Type netPrecision; | |||
ngraph::PartialShape inputShape; | |||
abs_threshold = 1.1; |
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.
it looks like a big threshold. could you elaborate what was the original threshold for this test before refactoring.
.../shared_tests_instances/low_precision_transformations/fuse_subtract_to_fq_transformation.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Evgenya Nugmanova <[email protected]>
…low_precision_transformations/fuse_multiply_to_fq_transformation.cpp Co-authored-by: Evgenya Nugmanova <[email protected]>
…low_precision_transformations/fuse_subtract_to_fq_transformation.cpp Co-authored-by: Evgenya Nugmanova <[email protected]>
Looks good! |
Details:
Tickets: