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.

hello_query_device shows no devices

mjhammel
Beginner
332 Views

I've built 2024.1.0 manually for our embedded Linux platform, which runs 5.15.21 with RT support.  It is a custom build based on the OpenVino Linux build instructions.  I've added most of the thirdparty packages into that directory, though not all, with the assumption that just dropping them into the thirdparty directory means OpenVino will use them as needed.  The build completes successfully and I've deployed to /opt/openvino.  I've set LD_LIBRARY_PATH to include /opt/openvino/lib, where I've placed all the libraries from the build.  All libraries are found for hello_query_device on the target:

$ ldd /opt/openvino/bin/hello_query_device
linux-vdso.so.1 (0x00007ffd7cfd3000)
libopenvino.so.2410 => /opt/openvino/lib/libopenvino.so.2410 (0x00007f972b209000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f972b027000)
libm.so.6 => /lib64/libm.so.6 (0x00007f972aee4000)
libssp.so.0 => /lib64/libssp.so.0 (0x00007f972aedf000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f972aec5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f972aea5000)
libc.so.6 => /lib64/libc.so.6 (0x00007f972ace3000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f972acde000)
/lib64/ld-linux-x86-64.so.2 (0x00007f972c490000)

But no devices are found when I run the sample program.

$ /opt/openvino/bin/hello_query_device
[ INFO ] Build ................................. 2024.1.0-8998-0b89bf8eebf-feature/QSYSDEV-35209
[ INFO ]
[ INFO ] Available devices:

Have I missed a dependency?  We last built from 2022.1.0 but that build was very different, so I'm thinking I missed some dependency that I can't identify.  I'm just doing the build and don't actually use OpenVino (our devs are linking their C++ to it) so if I missed something obvious let me know.  Thanks.

0 Kudos
6 Replies
Megat_Intel
Moderator
286 Views

Hi Mjhammel,

Thank you for reaching out to us.

 

To investigate further, could you provide us with the additional details below:

 

OS version :

CPU / GPU details :

Steps and additional configuration when you Build OpenVINO™ Runtime for Linux :

 

On the other hand, does the sample show any error messages or only shows no available devices? We suggest you try to enable plugins build for the CPU (ENABLE_INTEL_CPU) or GPU (ENABLE_INTEL_GPU) to see if this solves the issue. However, it should already be enabled if you are using x86 platforms.

 


Regards,

Megat


0 Kudos
mjhammel
Beginner
263 Views

Sure thing, Megat.  Here they are.

OS version:  completely custom build, not based on any desktop/server distro and not based on Buildroot, Yocto, OpenEmbedded build system.  Linux version is 5.15.21 with RT extensions.

CPU/GPU Details:  Currently testing the build on Apollo Lake Atom and Elkhart Lake Atom. 

Build steps.

  1. Build and install to staging tree both xbyak and oneTBB
  2. Unpack plugins to respective directories under OpenVino/thirdparty:
    1. pugixml
    2. gflags
    3. protobuf
    4. flatbuffers
    5. snappy
    6. onnx
    7. json
    8. zlib
  3. Build OpenVino using a custom Makefile target.

 

    cd $$@/build && \
        export TBBROOT=$($1_ARCH)/oneTBB-install/opt/openvino/ && \
        cmake -DCMAKE_BUILD_TYPE=Release \
              -DCMAKE_TOOLCHAIN_FILE=$(LOCAL_TOOLS)/bin/$($1_ARCH).cmake \
              -DOPENCL_VENDOR_PATH=/opt/openvino/etc/OpenCL/vendors \
              -DCMAKE_INSTALL_PREFIX=/opt/openvino \
              -DCMAKE_COLOR_MAKEFILE=OFF \
              -DENABLE_CPP_API=ON \
              -DCMAKE_VERBOSE_MAKEFILE=ON \
              -DTBB_BUILD=OFF \
              -DUSE_SYSTEM_TBB=ON \
              -DTBBMALLOC_BUILD=OFF \
              -DTHREADING=TBB \
              -DENABLE_INTEL_CPU=ON \
              -DENABLE_INTEL_GPU=ON \
              -DENABLE_SYSTEM_OPENCL=OFF \
              -DENABLE_PYTHON=OFF \
              CFLAGS="-fstack-protector-all -I$($1_INSTALL)/opt/openvino/include" \
              LDFLAGS="-L$($1_INSTALL)/opt/openvino/lib,-L$($1_INSTALL)/usr/lib -lpthread" \
              ..
    cd $$@/build && cmake --build . --parallel $(SIMUL)
    make -C $$@/build DESTDIR="../../openvino-install/" install
​

 

DESTDIR is used to create a tarball package used in a separate build process for the root file system.  Installation on the target is to /opt/openvino.  I do not install the setvars.sh script.  Previously I installed a custom version of that but haven't on this build yet.

I believe I've enabled what I need based on the plugins, but again, I may be missing something.

I was told this morning that the python hello_query_devices script DOES report CPU/GPU information.  However, we don't use python on the target platforms so that's not an option for us. 

 

Thanks again for your help Megat.

0 Kudos
mjhammel
Beginner
261 Views

One other thing:  Although the build host is x86_64, this is built using an x86_64 cross compiler because our primary tree is built for several different architectures, though OpenVino is just being built for x86_64.

0 Kudos
Megat_Intel
Moderator
159 Views

Hi Mjhammel,

Thank you for the information provided.

 

We are currently investigating this issue and will provide an update soon. For your information, I build OpenVINO™ 2024.1.0 from source using the same CMake configuration, but with the default third-party packages, and I was able to run the C++ Hello Query Sample.

./hello_query_device

[ INFO ] Build ................................. 2024.1.0-15008-f4afc983258
[ INFO ]
[ INFO ] Available devices:
[ INFO ] CPU
[ INFO ]        SUPPORTED_PROPERTIES:
[ INFO ]                Immutable: AVAILABLE_DEVICES : ""
[ INFO ]                Immutable: RANGE_FOR_ASYNC_INFER_REQUESTS : 1 1 1
[ INFO ]                Immutable: RANGE_FOR_STREAMS : 1 1
[ INFO ]                Immutable: EXECUTION_DEVICES : CPU
[ INFO ]                Immutable: FULL_DEVICE_NAME : Intel(R) Atom(TM) Processor E3950 @ 1.60GHz
[ INFO ]                Immutable: OPTIMIZATION_CAPABILITIES : FP32 FP16 INT8 BIN EXPORT_IMPORT
[ INFO ]                Immutable: DEVICE_TYPE : integrated
[ INFO ]                Immutable: DEVICE_ARCHITECTURE : intel64
[ INFO ]                Mutable: NUM_STREAMS : 1
[ INFO ]                Mutable: AFFINITY : CORE
[ INFO ]                Mutable: INFERENCE_NUM_THREADS : 0
[ INFO ]                Mutable: PERF_COUNT : NO
[ INFO ]                Mutable: INFERENCE_PRECISION_HINT : f32
[ INFO ]                Mutable: PERFORMANCE_HINT : LATENCY
[ INFO ]                Mutable: EXECUTION_MODE_HINT : PERFORMANCE
[ INFO ]                Mutable: PERFORMANCE_HINT_NUM_REQUESTS : 0
[ INFO ]                Mutable: ENABLE_CPU_PINNING : YES
[ INFO ]                Mutable: SCHEDULING_CORE_TYPE : ANY_CORE
[ INFO ]                Mutable: MODEL_DISTRIBUTION_POLICY : ""
[ INFO ]                Mutable: ENABLE_HYPER_THREADING : YES
[ INFO ]                Mutable: DEVICE_ID : ""
[ INFO ]                Mutable: CPU_DENORMALS_OPTIMIZATION : NO
[ INFO ]                Mutable: LOG_LEVEL : LOG_NONE
[ INFO ]                Mutable: CPU_SPARSE_WEIGHTS_DECOMPRESSION_RATE : 1
[ INFO ]                Mutable: DYNAMIC_QUANTIZATION_GROUP_SIZE : 0
[ INFO ]                Mutable: KV_CACHE_PRECISION : f16
[ INFO ]

 

 

Regards,

Megat

 

0 Kudos
mjhammel
Beginner
139 Views

Can you describe what you mean by "default third-party packages"?  Does that mean you don't add any source for those packages to the thirdparty directory?  I can try that that, although I think I've done that previously with the same result.

Does OpenCV play a part if GPU/GPU identification?  What code is responsible for finding that information?  Maybe I can track down a missing library or maybe the LD_LIBRARY_PATH is not setup correctly.

0 Kudos
Megat_Intel
Moderator
33 Views

Hi Mjhammel,

Apologies for the delay.

 

Yes, I did not add to the openvino/thirdparty directory and I left the directory the same as in the OpenVINO™ GitHub https://github.com/openvinotoolkit/openvino/tree/2024.1.0/thirdparty page. For further clarification, I provided the full steps that I used below. Some differences in my steps are I did not use the DCMAKE_TOOLCHAIN_FILE argument and I ran the command individually instead of using Makefile.

 

Build Steps:

1	git clone https://github.com/openvinotoolkit/openvino.git -b 2024.1.0
	cd openvino
	git submodule update --init --recursive

2.	chmod +x install_build_dependencies.sh
	sudo ./install_build_dependencies.sh

3.	mkdir build && cd build

4.	export TBBROOT=/home/user/intel/oneapi/tbb/

5.	cmake -DCMAKE_BUILD_TYPE=Release \
	-DOPENCL_VENDOR_PATH=/etc/OpenCL/vendors \
	-DCMAKE_INSTALL_PREFIX=/home/user/2410/ov \
	-DCMAKE_COLOR_MAKEFILE=OFF \
	-DENABLE_CPP_API=ON \
	-DCMAKE_VERBOSE_MAKEFILE=ON \
	-DTBB_BUILD=OFF \
	-DUSE_SYSTEM_TBB=ON \
	-DTBBMALLOC_BUILD=OFF \
	-DTHREADING=TBB \
	-DENABLE_INTEL_CPU=ON \
	-DENABLE_INTEL_GPU=ON \
	-DENABLE_SYSTEM_OPENCL=OFF \
	-DENABLE_PYTHON=OFF ..

6.	cmake --build . --parallel 4
	make install

7.	cd /home/user/2410/ov/samples/cpp
	./build_samples.sh

8.	cd /home/user/openvino_cpp_samples_build/intel64/Release
	./hello_query_device

 

Could you try to see if this method for building OpenVINO™ works for you? Do let us know of any issues you face.

 

On the other hand, OpenCV is not required to run OpenVINO inference as It is an optional dependency that can be used for computer vision alongside OpenVINO™.

 

For your information, the code responsible for finding the available devices In the C++ Hello Query Sample is the get_available_devices() method from the OpenVINO™ Inference C++ API.

 

 

Regards,

Megat

 

0 Kudos
Reply