Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6403 Discussions

How to set VPU_LOGGER_SECTION logging level

OKI__HIdetaka
New Contributor I
1,464 Views

Hi,

I would like to get some trace log during compiling and loading network in Myriad Plugin. To look at source code, there seems I could use env.log->trace()  and  VPU_LOGGER_SECTION(env.log), but I cannot find how to set logging level to "trace" and to enable logging function.

I will appreciate to advise me how to use logging function.

Best Regards,

 

0 Kudos
10 Replies
Iffa_Intel
Moderator
1,454 Views

Greetings,


May I know where did you get this source code? If possible could you share it with me?

Besides,which device are you using (eg: NCS) and do you have hddl together with it?


If you have, then this method is possible for you: https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/hddldeamon-log-file-for-VPU/td-p/1165725


Sincerely,

Iffa


0 Kudos
OKI__HIdetaka
New Contributor I
1,445 Views

Hi, thanks for your reply.

Regarding source code, I cloned from https://github.com/openvinotoolkit/openvino with -b  "releases/2020/3" for 2020.3 LTS.

I use arm64 box and Mustang-M2BM-MX2 board with Myriad plugin. I do not run HDDL plugin or hddl daemon on the box since I do not have them for arm64. I am afraid that I could not apply hddl daemon configuration described in the topic.

The original purpose for logging was to profile cpu runtime of compileNetwork() called from  ie.LoadNetwork() in Myraid plugin.  After posting this topic, I noticed that I could avoid compiling runtime to use ie.ImportNetwork() with pre-compiled .blob file. The priority of this issue is not so high, but I would like to confirm how to enable logging for some future analysis.

Best Regards,     

0 Kudos
Iffa_Intel
Moderator
1,438 Views


Have you tried using --log_level=DEBUG together with the command you used to run the model? I believe this is one of the common ways for logger.

For instance: ./object_detection_sample_ssd -i <path_to_image>/inputImage.bmp -m <path_to_model>person-detection-retail-0013.xml -d VPU --log_level=DEBUG



Sincerely,

Iffa



0 Kudos
OKI__HIdetaka
New Contributor I
1,428 Views

Hi,

Usually I use benchmark_app in toolkit for network model evaluation, and it does not accept --log_level= option.
To look at the source code of benchmark_app, there is no declaration for  log_level or something in command line option.

I find the following code in the cpp source ;

----

else if (device == "MYRIAD") {
ie.SetConfig({{ CONFIG_KEY(LOG_LEVEL), CONFIG_VALUE(LOG_WARNING) }}, device);
}

----

It seems that modifying the source and  re-compiling would be needed to change the LOG_LEVEL. 

Regards,

0 Kudos
Iffa_Intel
Moderator
1,416 Views

Could you help to specifically specify the location of the file, eg: deployment_tools/inference_engine/samples so I could take a closer look on this.


Basic functions in benchmark apps is as here: https://www.youtube.com/watch?v=n7HNNR3r4WE


Sincerely,

Iffa


0 Kudos
OKI__HIdetaka
New Contributor I
1,410 Views

Hi, 

The source code location is  line 226 of openvino/inference-engine/samples/benchmark_app/main.cpp   in the tree downloaded from github or the same line of openvino_2020.3.194/deployment_tools/inference_engine/samples/cpp/benchmark_app/main.cpp in the downloaded  binary package.

Best Regards,

 

0 Kudos
Iffa_Intel
Moderator
1,381 Views

Any chance that you could build Benchmark app in debug mode with -DCMAKE_BUILD_TYPE=Debug parameter instead of -DCMAKE_BUILD_TYPE=Release from the article Build and Run Object Detection Sample - https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_raspbian.html#run-sample



Sincerely,

Iffa


0 Kudos
petercoffin80
Beginner
1,378 Views

got solution to my problem. Thanks

0 Kudos
OKI__HIdetaka
New Contributor I
1,369 Views

Hi , 

Thanks for update.

I built sample programs with -DCMAKE_BUILD_TYPE=Debug successfully and ran benchmark_app. I cannot find log output text in syslog or dmesg.  I will check the document again and will update status.

Best Regards,

 

0 Kudos
Iffa_Intel
Moderator
1,357 Views

Greetings,


Intel will no longer monitor this thread since this issue has been resolved. If you need any additional information from Intel, please submit a new question.


Sincerely,

Iffa


0 Kudos
Reply