Skip to content

Runing tests on IE backend - #13774

Merged
opencv-pushbot merged 3 commits into
opencv:3.4from
l-bat:fix-IE-tests
Feb 15, 2019
Merged

opencv-pushbot merged 3 commits into
opencv:3.4from
l-bat:fix-IE-tests

Conversation

@l-bat

@l-bat l-bat commented Feb 7, 2019 •

Copy link
Copy Markdown
Contributor

This pullrequest changes

The following test now use IE backend:
Normalize layer

  • Test_Torch_layers.net_normalize
  • Test_Torch_nets.OpenFace_accuracy

Resize layer

  • Test_Darknet_nets.YOLOv3
  • Test_Darknet_layers.upsample
  • Test_Torch_layers.upsampling_nearest

LRN layer

  • Test_Caffe_layers.LRN

Performance test results

Processor: Intel® Core™ i5-6500 CPU @ 3.20GHz × 4
Graphics: Intel® HD Graphics 530 (Skylake GT2)

Name of Test Time before changes (ms) Time after changes (ms) x-factor after vs before
OpenFace::DNNTestNetwork::DLIE/CPU 18.298 17.791 0.97
OpenFace::DNNTestNetwork::DLIE/OCL 8.375 8.051 0.96
OpenFace::DNNTestNetwork::DLIE/OCL_FP16 8.778 7.491 0.85
YOLOv3::DNNTestNetwork::DLIE/MYRIAD 1946.705 1957.809 1.01
force_builders=Custom
docker_image:Custom=ubuntu-openvino-2018r5:16.04
test_opencl:Custom=ON
buildworker:Custom=linux-2
#test_modules=dnn
allow_multiple_commits=1

@dkurt

dkurt commented Feb 7, 2019

Copy link
Copy Markdown
Member

It looks like we can enable OCL_FP16 target as well:

if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_OPENCL_FP16)
throw SkipTestException("");

As here:

TEST_P(DNNTestNetwork, OpenFace)
{
#if defined(INF_ENGINE_RELEASE)
#if (INF_ENGINE_RELEASE < 2018030000 || INF_ENGINE_RELEASE == 2018050000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD)
throw SkipTestException("");
#elif INF_ENGINE_RELEASE < 2018040000
if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_OPENCL_FP16)
throw SkipTestException("Test is enabled starts from OpenVINO 2018R4");
#endif
#endif
if (backend == DNN_BACKEND_HALIDE)
throw SkipTestException("");
processNet("dnn/openface_nn4.small2.v1.t7", "", Size(96, 96), "");
}

P.S. it looks like we need to refactor framework-specific tests and test_backends.cpp because there are duplicated runs.

if (backendId == DNN_BACKEND_INFERENCE_ENGINE)
{
if (pnorm != 2)
if (!(pnorm == 2 || pnorm == 1)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pnorm is not used for IE layer creation so I think we still need to allow only pnorm == 2 for now.

#endif
checkBackend();
if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_OPENCL_FP16)
if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_OPENCL_FP16 && INF_ENGINE_RELEASE != 2018050000)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's keep this line unchanged. We test only the latest version (R5)

if (backendId == DNN_BACKEND_INFERENCE_ENGINE)
{
if (pnorm != 2)
if (pnorm != 2) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's better to remove brackets.

@dkurt dkurt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Thank you! the only thing is that for CPU measurement of OpenFace we need to specify OMP_WAIT_POLICY=PASSIVE to get better numbers:

Name of Test Time before changes (ms) Time after changes (ms)
OpenFace::DNNTestNetwork::DLIE/CPU 3.72ms - 3.95ms 3.52ms - 3.98ms

@alalek

alalek commented Feb 15, 2019

Copy link
Copy Markdown
Member

Is it still WIP?

@dkurt

dkurt commented Feb 15, 2019

Copy link
Copy Markdown
Member

@alalek, I removed it.

@dkurt dkurt self-assigned this Feb 15, 2019
@l-bat

l-bat commented Feb 15, 2019

Copy link
Copy Markdown
Contributor Author

Yes, I got result with OMP_WAIT_POLICY=PASSIVE. Without this x-factor = 1.04

@opencv-pushbot
opencv-pushbot merged commit 183c0fc into opencv:3.4 Feb 15, 2019
@alalek alalek mentioned this pull request Feb 19, 2019
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants