openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
7.22k stars 2.25k forks source link

What's wrong if clinfo shows GPU but Empty while querying available device? #17869

Closed devangaggarwal closed 1 year ago

devangaggarwal commented 1 year ago

Discussed in https://github.com/openvinotoolkit/openvino/discussions/17214

Originally posted by **CTHsieh1001** April 26, 2023 I have built my own openVINO 2022.3.0 in Ubuntu 2022.04 LTS And I can get GPU information using command: sudo clinfo ``` cthsieh@cthsieh:/mnt/sda4/Templates/openvino-2022.3.0/bin/intel64/Release$ sudo clinfo Number of platforms 1 Platform Name Intel(R) OpenCL HD Graphics Platform Vendor Intel(R) Corporation Platform Version OpenCL 3.0 Platform Profile FULL_PROFILE Platform Extensions cl_khr_byte_addressable_store cl_khr_device_uuid cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_command_queue_families cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_intel_mem_force_host_memory cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_subgroup_non_uniform_arithmetic cl_khr_subgroup_shuffle cl_khr_subgroup_shuffle_relative cl_khr_subgroup_clustered_reduce cl_intel_device_attribute_query cl_khr_suggested_local_work_size cl_intel_split_work_group_barrier cl_intel_planar_yuv cl_intel_packed_yuv cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_3d_image_writes cl_intel_media_block_io cl_intel_va_api_media_sharing cl_intel_sharing_format_query cl_khr_pci_bus_info cl_intel_subgroup_local_block_io Platform Extensions with Version cl_khr_byte_addressable_store 0x400000 (1.0.0) cl_khr_device_uuid 0x400000 (1.0.0) cl_khr_fp16 0x400000 (1.0.0) cl_khr_global_int32_base_atomics 0x400000 (1.0.0) cl_khr_global_int32_extended_atomics 0x400000 (1.0.0) cl_khr_icd 0x400000 (1.0.0) cl_khr_local_int32_base_atomics 0x400000 (1.0.0) cl_khr_local_int32_extended_atomics 0x400000 (1.0.0) cl_intel_command_queue_families 0x400000 (1.0.0) cl_intel_subgroups 0x400000 (1.0.0) cl_intel_required_subgroup_size 0x400000 (1.0.0) cl_intel_subgroups_short 0x400000 (1.0.0) cl_khr_spir 0x400000 (1.0.0) cl_intel_accelerator 0x400000 (1.0.0) cl_intel_driver_diagnostics 0x400000 (1.0.0) cl_khr_priority_hints 0x400000 (1.0.0) cl_khr_throttle_hints 0x400000 (1.0.0) cl_khr_create_command_queue 0x400000 (1.0.0) cl_intel_subgroups_char 0x400000 (1.0.0) cl_intel_subgroups_long 0x400000 (1.0.0) cl_khr_il_program 0x400000 (1.0.0) cl_intel_mem_force_host_memory 0x400000 (1.0.0) cl_khr_subgroup_extended_types 0x400000 (1.0.0) cl_khr_subgroup_non_uniform_vote 0x400000 (1.0.0) cl_khr_subgroup_ballot 0x400000 (1.0.0) cl_khr_subgroup_non_uniform_arithmetic 0x400000 (1.0.0) cl_khr_subgroup_shuffle 0x400000 (1.0.0) cl_khr_subgroup_shuffle_relative 0x400000 (1.0.0) cl_khr_subgroup_clustered_reduce 0x400000 (1.0.0) cl_intel_device_attribute_query 0x400000 (1.0.0) cl_khr_suggested_local_work_size 0x400000 (1.0.0) cl_intel_split_work_group_barrier 0x400000 (1.0.0) cl_intel_planar_yuv 0x400000 (1.0.0) cl_intel_packed_yuv 0x400000 (1.0.0) cl_khr_image2d_from_buffer 0x400000 (1.0.0) cl_khr_depth_images 0x400000 (1.0.0) cl_khr_3d_image_writes 0x400000 (1.0.0) cl_intel_media_block_io 0x400000 (1.0.0) cl_intel_va_api_media_sharing 0x400000 (1.0.0) cl_intel_sharing_format_query 0x400000 (1.0.0) cl_khr_pci_bus_info 0x400000 (1.0.0) cl_intel_subgroup_local_block_io 0x400000 (1.0.0) Platform Numeric Version 0xc00000 (3.0.0) Platform Extensions function suffix INTEL Platform Host timer resolution 1ns Platform Name Intel(R) OpenCL HD Graphics Number of devices 1 Device Name Intel(R) UHD Graphics [0x4571] Device Vendor Intel(R) Corporation Device Vendor ID 0x8086 Device Version OpenCL 3.0 NEO Device UUID 86800000-7145-0000-0000-000000000000 Driver UUID 32322e34-332e-3234-3539-352e33300000 Valid Device LUID No Device LUID c06c-a7e8fd7f0000 Device Node Mask 0 Device Numeric Version 0xc00000 (3.0.0) Driver Version 22.43.24595.30 Device OpenCL C Version OpenCL C 1.2 Device OpenCL C all versions OpenCL C 0x400000 (1.0.0) OpenCL C 0x401000 (1.1.0) OpenCL C 0x402000 (1.2.0) OpenCL C 0xc00000 (3.0.0) Device OpenCL C features __opencl_c_int64 0xc00000 (3.0.0) __opencl_c_3d_image_writes 0xc00000 (3.0.0) __opencl_c_images 0xc00000 (3.0.0) __opencl_c_read_write_images 0xc00000 (3.0.0) Latest comfornace test passed v2022-04-22-00 Device Type GPU Device Profile FULL_PROFILE Device Available Yes Compiler Available Yes Linker Available Yes Max compute units 32 Max clock frequency 850MHz Device Partition (core) Max number of sub-devices 0 Supported partition types None Supported affinity domains (n/a) Max work item dimensions 3 Max work item sizes 256x256x256 Max work group size 256 Preferred work group size multiple (device) 32 Preferred work group size multiple (kernel) 32 Max sub-groups per work group 0 Sub-group sizes (Intel) 8, 16, 32 Preferred / native vector sizes char 16 / 16 short 8 / 8 int 4 / 4 long 1 / 1 half 8 / 8 (cl_khr_fp16) float 1 / 1 double 1 / 1 (n/a) Half-precision Floating-point support (cl_khr_fp16) Denormals Yes Infinity and NANs Yes Round to nearest Yes Round to zero Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes Support is emulated in software No Single-precision Floating-point support (core) Denormals Yes Infinity and NANs Yes Round to nearest Yes Round to zero Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes Support is emulated in software No Correctly-rounded divide and sqrt operations No Double-precision Floating-point support (n/a) Address bits 32, Little-Endian Global memory size 3435970560 (3.2GiB) Error Correction support No Max memory allocation 1717985280 (1.6GiB) Unified memory for Host and Device Yes Shared Virtual Memory (SVM) capabilities (core) Coarse-grained buffer sharing No Fine-grained buffer sharing No Fine-grained system sharing No Atomics No Minimum alignment for any data type 128 bytes Alignment of base address 1024 bits (128 bytes) Preferred alignment for atomics SVM 64 bytes Global 64 bytes Local 64 bytes Atomic memory capabilities relaxed, work-group scope Atomic fence capabilities relaxed, acquire/release, work-group scope Max size for global variable 0 Preferred total size of global vars 0 Global Memory cache type Read/Write Global Memory cache size 1310720 (1.25MiB) Global Memory cache line size 64 bytes Image support Yes Max number of samplers per kernel 16 Max size for 1D images from buffer 107374080 pixels Max 1D or 2D image array size 2048 images Base address alignment for 2D image buffers 4 bytes Pitch alignment for 2D image buffers 4 pixels Max 2D image size 16384x16384 pixels Max planar YUV image size 16384x16352 pixels Max 3D image size 16384x16384x2048 pixels Max number of read image args 128 Max number of write image args 128 Max number of read/write image args 128 Pipe support No Max number of pipe args 0 Max active pipe reservations 0 Max pipe packet size 0 Local memory type Local Local memory size 65536 (64KiB) Max number of constant args 8 Max constant buffer size 1717985280 (1.6GiB) Generic address space support No Max size of kernel argument 2048 (2KiB) Queue properties (on host) Out-of-order execution Yes Profiling Yes Device enqueue capabilities (n/a) Queue properties (on device) Out-of-order execution No Profiling No Preferred size 0 Max size 0 Max queues on device 0 Max events on device 0 Prefer user sync for interop Yes Profiling timer resolution 52ns Execution capabilities Run OpenCL kernels Yes Run native kernels No Non-uniform work-groups Yes Work-group collective functions No Sub-group independent forward progress No IL version SPIR-V_1.2 ILs with version SPIR-V 0x402000 (1.2.0) SPIR versions 1.2 printf() buffer size 4194304 (4MiB) Built-in kernels (n/a) Built-in kernels with version (n/a) Device Extensions cl_khr_byte_addressable_store cl_khr_device_uuid cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_command_queue_families cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_intel_mem_force_host_memory cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_subgroup_non_uniform_arithmetic cl_khr_subgroup_shuffle cl_khr_subgroup_shuffle_relative cl_khr_subgroup_clustered_reduce cl_intel_device_attribute_query cl_khr_suggested_local_work_size cl_intel_split_work_group_barrier cl_intel_planar_yuv cl_intel_packed_yuv cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_3d_image_writes cl_intel_media_block_io cl_intel_va_api_media_sharing cl_intel_sharing_format_query cl_khr_pci_bus_info cl_intel_subgroup_local_block_io Device Extensions with Version cl_khr_byte_addressable_store 0x400000 (1.0.0) cl_khr_device_uuid 0x400000 (1.0.0) cl_khr_fp16 0x400000 (1.0.0) cl_khr_global_int32_base_atomics 0x400000 (1.0.0) cl_khr_global_int32_extended_atomics 0x400000 (1.0.0) cl_khr_icd 0x400000 (1.0.0) cl_khr_local_int32_base_atomics 0x400000 (1.0.0) cl_khr_local_int32_extended_atomics 0x400000 (1.0.0) cl_intel_command_queue_families 0x400000 (1.0.0) cl_intel_subgroups 0x400000 (1.0.0) cl_intel_required_subgroup_size 0x400000 (1.0.0) cl_intel_subgroups_short 0x400000 (1.0.0) cl_khr_spir 0x400000 (1.0.0) cl_intel_accelerator 0x400000 (1.0.0) cl_intel_driver_diagnostics 0x400000 (1.0.0) cl_khr_priority_hints 0x400000 (1.0.0) cl_khr_throttle_hints 0x400000 (1.0.0) cl_khr_create_command_queue 0x400000 (1.0.0) cl_intel_subgroups_char 0x400000 (1.0.0) cl_intel_subgroups_long 0x400000 (1.0.0) cl_khr_il_program 0x400000 (1.0.0) cl_intel_mem_force_host_memory 0x400000 (1.0.0) cl_khr_subgroup_extended_types 0x400000 (1.0.0) cl_khr_subgroup_non_uniform_vote 0x400000 (1.0.0) cl_khr_subgroup_ballot 0x400000 (1.0.0) cl_khr_subgroup_non_uniform_arithmetic 0x400000 (1.0.0) cl_khr_subgroup_shuffle 0x400000 (1.0.0) cl_khr_subgroup_shuffle_relative 0x400000 (1.0.0) cl_khr_subgroup_clustered_reduce 0x400000 (1.0.0) cl_intel_device_attribute_query 0x400000 (1.0.0) cl_khr_suggested_local_work_size 0x400000 (1.0.0) cl_intel_split_work_group_barrier 0x400000 (1.0.0) cl_intel_planar_yuv 0x400000 (1.0.0) cl_intel_packed_yuv 0x400000 (1.0.0) cl_khr_image2d_from_buffer 0x400000 (1.0.0) cl_khr_depth_images 0x400000 (1.0.0) cl_khr_3d_image_writes 0x400000 (1.0.0) cl_intel_media_block_io 0x400000 (1.0.0) cl_intel_va_api_media_sharing 0x400000 (1.0.0) cl_intel_sharing_format_query 0x400000 (1.0.0) cl_khr_pci_bus_info 0x400000 (1.0.0) cl_intel_subgroup_local_block_io 0x400000 (1.0.0) NULL platform behavior clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Intel(R) OpenCL HD Graphics clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [INTEL] clCreateContext(NULL, ...) [default] Success [INTEL] clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1) Platform Name Intel(R) OpenCL HD Graphics Device Name Intel(R) UHD Graphics [0x4571] clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1) Platform Name Intel(R) OpenCL HD Graphics Device Name Intel(R) UHD Graphics [0x4571] clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1) Platform Name Intel(R) OpenCL HD Graphics Device Name Intel(R) UHD Graphics [0x4571] ICD loader properties ICD loader Name OpenCL ICD Loader ICD loader Vendor OCL Icd free software ICD loader Version 2.2.14 ICD loader Profile OpenCL 3.0 cthsieh@cthsieh:/mnt/sda4/Templates/openvino-2022.3.0/bin/intel64/Release$ ``` But it shows empty while querying available device: ``` cthsieh@cthsieh:/mnt/sda4/Templates/openvino-2022.3.0/bin/intel64/Release$ sudo ./hello_query_device [ INFO ] Build ................................. 2022.3.0-9052-9752fafe8eb-HEAD [ INFO ] [ INFO ] Available devices: cthsieh@cthsieh:/mnt/sda4/Templates/openvino-2022.3.0/bin/intel64/Release$ ``` By the way, I can run bench_mark using CPU: ``` cthsieh@cthsieh:/mnt/sda4/Templates/openvino-2022.3.0/bin/intel64/Release$ sudo ./benchmark_app_legacy -d "CPU" -m /mnt/sda4/intel/models/external/model00/fp16/person-vehicle-bike-detection-crossroad-0078.xml [Step 1/11] Parsing and validating input arguments [ INFO ] Parsing input parameters [Step 2/11] Loading Inference Engine [ INFO ] InferenceEngine: IE version ......... 2022.3.0 Build ........... 2022.3.0-9052-9752fafe8eb-HEAD [ INFO ] Device info: CPU openvino_intel_cpu_plugin version ......... 2022.3.0 Build ........... 2022.3.0-9052-9752fafe8eb-HEAD [Step 3/11] Setting device configuration [ WARNING ] -nstreams default value is determined automatically for CPU device. Although the automatic selection usually provides a reasonable performance, but it still may be non-optimal for some cases, for more information look at README. [Step 4/11] Reading network files [ INFO ] Loading network files [ INFO ] Read network took 193.80 ms [Step 5/11] Resizing network to match image sizes and given batch [ INFO ] Network batch size: 1 [Step 6/11] Configuring input of the model Network inputs: data : U8 / NCHW Network outputs: detection_out : FP32 / NCHW [Step 7/11] Loading the model to the device [ INFO ] Load network took 2561.76 ms [Step 8/11] Setting optimal runtime parameters [Step 9/11] Creating infer requests and filling input blobs with images [ INFO ] Network input 'data' precision U8, dimensions (NCHW): 1 3 1024 1024 [ WARNING ] No input files were given: all inputs will be filled with random values! [ INFO ] Infer Request 0 filling [ INFO ] Fill input 'data' with random values (image is expected) [ INFO ] Infer Request 1 filling [ INFO ] Fill input 'data' with random values (image is expected) [ INFO ] Infer Request 2 filling [ INFO ] Fill input 'data' with random values (image is expected) [ INFO ] Infer Request 3 filling [ INFO ] Fill input 'data' with random values (image is expected) [Step 10/11] Measuring performance (Start inference asynchronously, 4 inference requests using 4 streams for CPU, limits: 60000 ms duration) [ INFO ] First inference took 3337.71 ms [Step 11/11] Dumping statistics report Count: 68 iterations Duration: 67134.77 ms Latency: 3801.42 ms Throughput: 1.01 FPS cthsieh@cthsieh:/mnt/sda4/Templates/openvino-2022.3.0/bin/intel64/Release$ ``` Get "Unreachable: Bad cast from ...." while running bench_mark using GPU: ``` cthsieh@cthsieh:/mnt/sda4/Templates/openvino-2022.3.0/bin/intel64/Release$ sudo ./benchmark_app_legacy -d "GPU" -m /mnt/sda4/intel/models/external/model00/fp16/person-vehicle-bike-detection-crossroad-0078.xml [Step 1/11] Parsing and validating input arguments [ INFO ] Parsing input parameters [Step 2/11] Loading Inference Engine [ INFO ] InferenceEngine: IE version ......... 2022.3.0 Build ........... 2022.3.0-9052-9752fafe8eb-HEAD [ INFO ] Device info: [ ERROR ] Check 'false' failed at src/core/include/openvino/core/any.hpp:806: Unreachable: Bad cast from: NSt3__16vectorIN2ov12PropertyNameENS_9allocatorIS2_EEEE to: NSt3__16vectorIN2ov12PropertyNameENS_9allocatorIS2_EEEE cthsieh@cthsieh:/mnt/sda4/Templates/openvino-2022.3.0/bin/intel64/Release$ ``` Is there anyting missing to cause the problem?
ilya-lavrenov commented 1 year ago

Hi @devangaggarwal

According to that discussion we recommended not to use -stdlib flag. Could you please check that it helps?