[PP GAPI] Addded tests to cover exisiting precision conversions done by some plugins#1976
Conversation
|
@anton-potapov can we extend for CPU plugin as well? Because template plugin tests are not running by CI at the moment.. |
77851ff to
f54baf4
Compare
@ilya-lavrenov sure we can. But the problem is that they are failing, not sure why :) |
|
@anton-potapov suggest to debug :) maybe the problems in tests + template plugin? I wonder if CPU plugin contains such bugs |
@ilya-lavrenov IMHO it is the cpu plugin fault. So lets move with this one to enable #857 with examples |
|
@anton-potapov ok, can we add such tests for any other plugin? I just want to make sure that tests itself as correct. |
f54baf4 to
e5046d1
Compare
Added tests for CPU plugin and fix for it. @dmitry-gorokhov could you please take a look ? |
|
@anton-potapov please, make sure tests and CI are green. |
47761c0 to
adb48f0
Compare
inference-engine/tests/functional/plugin/shared/include/behavior/preprocessing.hpp
Outdated
Show resolved
Hide resolved
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/preprocessing.cpp
Show resolved
Hide resolved
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/preprocessing.cpp
Outdated
Show resolved
Hide resolved
docs/template_plugin/tests/functional/shared_tests_instances/behavior/preprocessing.cpp
Outdated
Show resolved
Hide resolved
|
|
||
| std::vector<size_t> inputShape {4, 4}; | ||
|
|
||
| //Idea of the tests is |
There was a problem hiding this comment.
Minor corrections (please check the 2nd bullet! It wasn't readable, but my fixes might've ruined the meaning):
// This test:
// - Uses a no-op graph to test the plugin internal precision preprocessing only.
// - Mimics the reference code preprocessing via an extra nGraph Convert operation.
// Two graphs are created: a graph for the plugin and a graph for the nGraph reference code.
Also in the last one - who exactly creates the graphs? Some particular function? If so, let's state it
There was a problem hiding this comment.
Minor corrections (please check the 2nd bullet! It wasn't readable, but my fixes might've ruined the meaning):
// This test: // - Uses a no-op graph to test the plugin internal precision preprocessing only. // - Mimics the reference code preprocessing via an extra nGraph Convert operation. // Two graphs are created: a graph for the plugin and a graph for the nGraph reference code.
changed to :
// This test:
// - Strive to test the plugin internal preprocessing (precision conversion) only.
// Thus (logically) no-op graph is used.
// - Reference code mimic the preprocessing via extra ngraph Convert operation.
// - Create/uses two (different) graphs here : one to feed the the plugin and one calculate the reference result.
and moved the comment to the beginning of the function.
Also in the last one - who exactly creates the graphs? Some particular function? If so, let's state it
the graphs are created via helper lambda :
function = make_ngraph(false);
reference_function = make_ngraph(true); //use extra ops to mimic the preprocessingDoes it make more sense now ?
adb48f0 to
573074c
Compare
|
@dmitry-gorokhov , @aalborov ping |
|
@anton-potapov please, make CI green |
f98463c to
7a3ece4
Compare
some plugins - added shared parameterized tests - instantiated for template plugin - instantiated for cpu plugin - fixed CPU plugin to properly handle U16 input - fixed CPU reverse_sequence primitive to alolw input/oputput tensors to be in FP32 only - updated ngraph test_simple_computation_on_ndarrays to not expect failure on U16 input
7a3ece4 to
55d7d05
Compare
To cover existing code of precision conversion in the plugins (i.e. TEMPLATE) with the test following was done
MKLDNNPlugin::Engine::LoadExeNetworkImpl, which convert allU16nodes toI32MKLDNNPlugin::MKLDNNInferRequest::InferImpl, which were convertingU16toFP32(changed toI32)FP32input/output (assumed that plugin will inserted needed conversions to the graph)