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.

Failed to create openvino inference engine on GPU-"failed to create engine: clGetPlatformIDs error -1001"

Yuanjie_B_Intel
Employee
3,417 Views

Error is below:

command:  ~/dldt/inference-engine/bin/intel64/Release$ ./object_detection_sample_ssd -i ~/computer_vision_sdk_2018.3.343/deployment_tools/demo/car_1.bmp -m ~/dldt/model_optimizer/frozen_inference_graph.xml -d GPU

result:
[ INFO ] InferenceEngine:
        API version ............ 1.4
        Build .................. custom_2018_91160e65cf66e7fbc709245a8ba948a4c555e443
Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ]     /opt/intel/computer_vision_sdk_2018.3.343/deployment_tools/demo/car_1.bmp
[ INFO ] Loading plugin

        API version ............ 1.4
        Build .................. custom_2018_91160e65cf66e7fbc709245a8ba948a4c555e443
        Description ....... clDNNPlugin
[ INFO ] Loading network files:
        /home/yuanjie/dldt/model_optimizer/frozen_inference_graph.xml
        /home/yuanjie/dldt/model_optimizer/frozen_inference_graph.bin
[ INFO ] Preparing input blobs
[ INFO ] Batch size is 1
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the plugin
[ ERROR ] failed to create engine: clGetPlatformIDs error -1001

 

I have finished environment config according to https://software.intel.com/en-us/articles/OpenVINO-Install-Linux#gpu-steps and build according to steps in https://github.com/opencv/dldt/blob/2018/inference-engine/README.md.

I attach my GPU information and inference engine version in case you need

0 Kudos
31 Replies
nikos1
Valued Contributor I
2,719 Views

Hello Yuanjie,

OpenVino needs an Intel GPU to run using the cldnn plug-in when -d GPU option is used. 

I think your CPU is a Xeon E5 and those do not have a GPU ( please refer to https://ark.intel.com/products/series/78583/Intel-Xeon-Processor-E5-v3-Family ) . If this is the case you cannot run using -d GPU or run inference using OpenVino on a discrete GPU.

You can still run with FP32 IR using the -d CPU parameter.

Cheers,

Nikos

0 Kudos
Yuanjie_B_Intel
Employee
2,719 Views

Hi Nikos,

 Thank you very much! I will go on try. 

Best wishes, 

Yuanjie

0 Kudos
Yuanjie_B_Intel
Employee
2,719 Views

Nikos wrote:

Hello Yuanjie,

OpenVino needs an Intel GPU to run using the cldnn plug-in when -d GPU option is used. 

I think your CPU is a Xeon E5 and those do not have a GPU ( please refer to https://ark.intel.com/products/series/78583/Intel-Xeon-Processor-E5-v3-F. ) . If this is the case you cannot run using -d GPU or run inference using OpenVino on a discrete GPU.

You can still run with FP32 IR using the -d CPU parameter.

Cheers,

Nikos

Hi Nikos,

  I was wondering if there were suitable machine types that worked well for both "-d CPU" and "-d GPU" options according to your knowledge in this case. If so, I would like to check if out team have available machines. I appreciate your help.

Best wishes,

Yuanjie

0 Kudos
Deng__Fucheng
Beginner
2,719 Views

Ba, Yuanjie (Intel) wrote:

Quote:

Nikos wrote:

 

Hello Yuanjie,

OpenVino needs an Intel GPU to run using the cldnn plug-in when -d GPU option is used. 

I think your CPU is a Xeon E5 and those do not have a GPU ( please refer to https://ark.intel.com/products/series/78583/Intel-Xeon-Processor-E5-v3-F... ) . If this is the case you cannot run using -d GPU or run inference using OpenVino on a discrete GPU.

You can still run with FP32 IR using the -d CPU parameter.

Cheers,

Nikos

 

 

Hi Nikos,

  I was wondering if there were suitable machine types that worked well for both "-d CPU" and "-d GPU" options according to your knowledge in this case. If so, I would like to check if out team have available machines. I appreciate your help.

Best wishes,

Yuanjie

I tried intel core i5-7300U, it works fine with both CPU and  GPU

0 Kudos
Yuanjie_B_Intel
Employee
2,719 Views

Deng, Fucheng wrote:

Quote:

Ba, Yuanjie (Intel) wrote:

 

Quote:

Nikos wrote:

 

Hello Yuanjie,

OpenVino needs an Intel GPU to run using the cldnn plug-in when -d GPU option is used. 

I think your CPU is a Xeon E5 and those do not have a GPU ( please refer to https://ark.intel.com/products/series/78583/Intel-Xeon-Processor-E5-v3-F... ) . If this is the case you cannot run using -d GPU or run inference using OpenVino on a discrete GPU.

You can still run with FP32 IR using the -d CPU parameter.

Cheers,

Nikos

 

 

Hi Nikos,

  I was wondering if there were suitable machine types that worked well for both "-d CPU" and "-d GPU" options according to your knowledge in this case. If so, I would like to check if out team have available machines. I appreciate your help.

Best wishes,

Yuanjie

 

 

I tried intel core i5-7300U, it works fine with both CPU and  GPU

Thanks Fucheng,

I will check if our  team has this type. And if you know  other machine types available as well, please tell me, especially if any type of i7 works fine.

Best wishes,

Yuanjie

0 Kudos
nikos1
Valued Contributor I
2,719 Views

All recent Core CPUs and also Atom and Xeon E3V3/4/5 have GPUs  and should work fine.

If in doubt check your CPU model in the Intel ark tool

https://ark.intel.com/Search/FeatureFilter?productType=processors&IntegratedGraphics=true ;

0 Kudos
Yuanjie_B_Intel
Employee
2,719 Views

nikos wrote:

All recent Core CPUs and also Atom and Xeon E3V3/4/5 have GPUs  and should work fine.

If in doubt check your CPU model in the Intel ark tool

https://ark.intel.com/Search/FeatureFilter?productType=processors&Integr... 

Thanks Nikos!

I tried an "Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)". Unfortunately, my attempt showed the same result as above. I am not sure if there is anything wrong with my work. I want to find out how to solve.

0 Kudos
nikos1
Valued Contributor I
2,719 Views

Hello Yuanjie,

I think first step would be to make sure the OS can see the GPU and also OpenCL environment is properly installed.

What is the GPU device ID, is it in the clDNN device list?  What is the clinfo output?

If OpenCL cannot see the Intel GPU OpenCL device you cannot run with -d GPU (but -d CPU should work fine).

As the Xeon E3v3 CPU is a bit older the NEO driver may not work. You may need to try the legacy OpenCL driver as described in another post in this forum (search for Linux OpenCL installation). First you need to see a valid GPU OpenCL device when you run clinfo.

Cheers,

Nikos

0 Kudos
Yuanjie_B_Intel
Employee
2,719 Views

nikos wrote:

Hello Yuanjie,

I think first step would be to make sure the OS can see the GPU and also OpenCL environment is properly installed.

What is the GPU device ID, is it in the clDNN device list?  What is the clinfo output?

If OpenCL cannot see the Intel GPU OpenCL device you cannot run with -d GPU (but -d CPU should work fine).

As the Xeon E3v3 CPU is a bit older the NEO driver may not work. You may need to try the legacy OpenCL driver as described in another post in this forum (search for Linux OpenCL installation). First you need to see a valid GPU OpenCL device when you run clinfo.

Cheers,

Nikos

Hi Nikos,

Thanks to your help my previous problem has been solved !

I installed openCL 2012 (according to steps and the download link here: https://github.com/guruofquality/grex/wiki/OpenCL) and figured out clinfo output (the attachment). It began to show information about my GPU. Among the information I found the ' clGetPlatformInfo' function and regarding GPU info - I think the previous problem about this function had been solved in this way.

However, a new problem occurred - 'Segmentation fault (core dumped)'. The terminal output changes to:
[ INFO ] InferenceEngine:
        API version ............ 1.4
        Build .................. custom_2018_3600f36d7bb24e5193cbf6a3aaf98b085942a091
Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ]     /opt/intel/computer_vision_sdk_2018.3.343/deployment_tools/demo/car_1.bmp
[ INFO ] Loading plugin

        API version ............ 1.4
        Build .................. custom_2018_3600f36d7bb24e5193cbf6a3aaf98b085942a091
        Description ....... clDNNPlugin
[ INFO ] Loading network files:
        /home/yuanjie/model_optimizer/frozen_inference_graph.xml
        /home/yuanjie/model_optimizer/frozen_inference_graph.bin
[ INFO ] Preparing input blobs
[ INFO ] Batch size is 1
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the plugin
Segmentation fault (core dumped)

I am confused if the problem was caused by an earlier or older version of OpenCL. I have to struggle with a right legacy OpenCL driver. Sincerely I need your guidance again.

I attached my clinfo output. What's more, '-d GPU' fails while '-d CPU' works well. I attached the output as well. 

Thanks,

Yuanjie

 

0 Kudos
nikos1
Valued Contributor I
2,719 Views

Hello Yuanjie,

There is an OpenCL installation issue. You clifno reports that we have a good OpenCL CPU device which is good but in our case we do not need it as -d CPU runs on MKLDNN and not using OpenCL CPU. 

What you really need for -d GPU is clinfo to report a valid OpenCL GPU device and this is not the case according to clinfo and also this line:

clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform

Let's try to install OpenCL for your GPU.  I think your CPU is Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz so it has an Intel® HD Graphics 4600 so in theory it should work if the proper OpenCL driver is installed.

What is the OS and kernel version?

Cheers,

Nikos 

0 Kudos
Yuanjie_B_Intel
Employee
2,719 Views

nikos wrote:

Hello Yuanjie,

There is an OpenCL installation issue. You clifno reports that we have a good OpenCL CPU device which is good but in our case we do not need it as -d CPU runs on MKLDNN and not using OpenCL CPU. 

What you really need for -d GPU is clinfo to report a valid OpenCL GPU device and this is not the case according to clinfo and also this line:

clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform

Let's try to install OpenCL for your GPU.  I think your CPU is Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz so it has an Intel® HD Graphics 4600 so in theory it should work if the proper OpenCL driver is installed.

What is the OS and kernel version?

Cheers,

Nikos 

Hi Nikos,

My kernel version is: 4.14.20-041420-generic. And my OS is Ubuntu 16.04.5 LTS.

I just found this link: https://software.intel.com/en-us/articles/opencl-drivers#graph-lin-ubuntu. It is OpenCL for GPUs on  Linux OS ubuntu 16.04.x. I would like to ensure it is the right way. I am trying to check it but still struggling with an error.

Thanks,

Yuanjie

0 Kudos
Yuanjie_B_Intel
Employee
2,720 Views

nikos wrote:

Hello Yuanjie,

There is an OpenCL installation issue. You clifno reports that we have a good OpenCL CPU device which is good but in our case we do not need it as -d CPU runs on MKLDNN and not using OpenCL CPU. 

What you really need for -d GPU is clinfo to report a valid OpenCL GPU device and this is not the case according to clinfo and also this line:

clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform

Let's try to install OpenCL for your GPU.  I think your CPU is Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz so it has an Intel® HD Graphics 4600 so in theory it should work if the proper OpenCL driver is installed.

What is the OS and kernel version?

Cheers,

Nikos 

Hi Nikos, 

Can you tell me how to enable OpenCL for my GPU? I have spent a lot of time on it. 

Thanks a lot, 

Yuanjie

0 Kudos
nikos1
Valued Contributor I
2,720 Views

Hello Yuanjie,

The recommended way of installing OpenCL GPU can be found in 

https://software.intel.com/en-us/articles/OpenVINO-Install-Linux

Please refer to section "Additional installation steps for processor graphics (GPU) "

./install_NEO_OCL_driver.sh

Let me know if you it is successful. Please post clinfo after a reboot.

if not we can try a different technique next.

Cheers,

Nikos

 

 

0 Kudos
nikos1
Valued Contributor I
2,719 Views

If NEO installation fails you may want to try this solution I posted in https://software.intel.com/en-us/forums/computer-vision/topic/798986

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip
unzip SRB5.0_linux64.zip -d SRB5.0_linux64
cd SRB5.0_linux64
sudo apt-get install xz-utils
mkdir intel-opencl
tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz
tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz
tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz
sudo cp -R intel-opencl/* /
sudo ldconfig

 

 

0 Kudos
Yuanjie_B_Intel
Employee
2,720 Views

nikos wrote:

Hello Yuanjie,

The recommended way of installing OpenCL GPU can be found in 

https://software.intel.com/en-us/articles/OpenVINO-Install-Linux

Please refer to section "Additional installation steps for processor graphics (GPU) "

./install_NEO_OCL_driver.sh

Let me know if you it is successful. Please post clinfo after a reboot.

if not we can try a different technique next.

Cheers,

Nikos

 

 

Hi Nikos, After reboot the clinfo returns:

clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Intel(R) OpenCL
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [INTEL]
  clCreateContext(NULL, ...) [default]            Success [INTEL]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  Success (1)
    Platform Name                                 Intel(R) OpenCL
    Device Name                                   Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No devices found in platform
  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
    Device Name                                   Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz

More details of clinfo output is attached.

Thanks,

Yuanjie

0 Kudos
Yuanjie_B_Intel
Employee
2,719 Views

nikos wrote:

If NEO installation fails you may want to try this solution I posted in https://software.intel.com/en-us/forums/computer-vision/topic/798986

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip
unzip SRB5.0_linux64.zip -d SRB5.0_linux64
cd SRB5.0_linux64
sudo apt-get install xz-utils
mkdir intel-opencl
tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz
tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz
tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz
sudo cp -R intel-opencl/* /
sudo ldconfig

 

 

Hi Nikos, 

Next, I tried the commands. The clinfo output turned to:

clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              Success [INTEL]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No platform
 

More details of the clinfo output is attached. I am still working on it and looking forward to more suggestions from you.

Thank you,

Yuanjie

0 Kudos
nikos1
Valued Contributor I
2,721 Views

Hello Yuanjie,

Sorry to hear still no OpenCL GPU devices appears in your clinfo output. This is essential for OpenVIno to work with -d GPU so we have to enable this path. We need to find out more about the system configuration to ensure the GPU device is visible.

1) I believe this the CPU model in your system :  Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz.  Is this correct? Please confirm using

sudo lshw -C cpu

2) According to https://ark.intel.com/products/80806/Intel-Core-i7-4790-Processor-8M-Cache-up-to-4-00-GHz- there is a GPU : 

Intel® HD Graphics 4600 which supports OpenCL. Please confirm using

lspci | grep VGA

and / or

sudo lshw -C video

3) I believe the kernel is  4.14.20-041420-generic - Please confirm using

uname -a

4) Is there also a discrete GPU plugged in this system in the PCI-e bus?  I think if there is it should appear in the output of 

lspci | grep VGA

5) If you also have discrete graphics card things are more complicates to set up. Easier way would be to connect HDMI / DVI or DP cable directly to the motherboard graphics graphics output (not the discrete GPU). 

6) Is the BIOS updated to the latest version? If not please update.

7) Is there a BIOS enable integrated graphics option? It should be enabled. 

8) Is there a BIOS option to specify what screen/display would be primary? It should be set to Intel graphics.

9) If all items above look good, another option is to upgrade kernel to 4.15  - I had some issues 4.14 in some older systems so that could help.

Good luck!

 nikos

0 Kudos
Yuanjie_B_Intel
Employee
2,721 Views

nikos wrote:

Hello Yuanjie,

Sorry to hear still no OpenCL GPU devices appears in your clinfo output. This is essential for OpenVIno to work with -d GPU so we have to enable this path. We need to find out more about the system configuration to ensure the GPU device is visible.

1) I believe this the CPU model in your system :  Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz.  Is this correct? Please confirm using

sudo lshw -C cpu

2) According to https://ark.intel.com/products/80806/Intel-Core-i7-4790-Processor-8M-Cac... there is a GPU : 

Intel® HD Graphics 4600 which supports OpenCL. Please confirm using

lspci | grep VGA

and / or

sudo lshw -C video

3) I believe the kernel is  4.14.20-041420-generic - Please confirm using

uname -a

4) Is there also a discrete GPU plugged in this system in the PCI-e bus?  I think if there is it should appear in the output of 

lspci | grep VGA

5) If you also have discrete graphics card things are more complicates to set up. Easier way would be to connect HDMI / DVI or DP cable directly to the motherboard graphics graphics output (not the discrete GPU). 

6) Is the BIOS updated to the latest version? If not please update.

7) Is there a BIOS enable integrated graphics option? It should be enabled. 

8) Is there a BIOS option to specify what screen/display would be primary? It should be set to Intel graphics.

9) If all items above look good, another option is to upgrade kernel to 4.15  - I had some issues 4.14 in some older systems so that could help.

Good luck!

 nikos

Hi Nikos, 

I appreciate your professional help and your patience. According to the list, I am afraid that the GPU is Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller other than Intel® HD Graphics 4600. Other info is exactly the same as you listed. More concretely, 

1) CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz

2) GPU: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller

3) kernel: 4.14.20-041420-generic

4) does not have a discrete GPU: 

yuanjie@zilin-Z97X-UD5H:~$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

In this way is there any change of the steps?

I will confirm my Bios updated and enabled, going on try as you suggested. 

Thanks, 

Yuanjie

0 Kudos
nikos1
Valued Contributor I
2,721 Views

Hello Yuanjie,

Sorry I assumed the output of clinfo was correctly reporting CPU model.  Could we possibly confirm the exact CPU model? What is the output of 

cat /proc/cpuinfo | grep "model name" | uniq

and what is the output of 

sudo lshw -C cpu

It maybe that it is one of the older Xeon E3 that has a GPU that does not support OpenCL.

Some of the CPUs in the Xeons in https://ark.intel.com/products/series/78581/Intel-Xeon-Processor-E3-v3-Family have OpenCL GPUs and some do not. We need to find the exact model.

Thank you,

Nikos

0 Kudos
Yuanjie_B_Intel
Employee
2,147 Views

nikos wrote:

Hello Yuanjie,

Sorry I assumed the output of clinfo was correctly reporting CPU model.  Could we possibly confirm the exact CPU model? What is the output of 

cat /proc/cpuinfo | grep "model name" | uniq

and what is the output of 

sudo lshw -C cpu

It maybe that it is one of the older Xeon E3 that has a GPU that does not support OpenCL.

Some of the CPUs in the Xeons in https://ark.intel.com/products/series/78581/Intel-Xeon-Processor-E3-v3-F... have OpenCL GPUs and some do not. We need to find the exact model.

Thank you,

Nikos

Hi Nikos,

yuanjie@zilin-Z97X-UD5H:~$ cat /proc/cpuinfo | grep "model name" | uniq
model name      : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
yuanjie@zilin-Z97X-UD5H:~$ sudo lshw -C cpu
[sudo] password for yuanjie:
  *-cpu
       description: CPU
       product: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
       vendor: Intel Corp.
       physical id: 3d
       bus info: cpu@0
       version: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
       slot: SOCKET 0
       size: 3917MHz
       capacity: 4GHz
       width: 64 bits
       clock: 100MHz
       capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm abm cpuid_fault invpcid_single pti tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm xsaveopt dtherm ida arat pln pts cpufreq
       configuration: cores=4 enabledcores=4 threads=8
 

Thanks,

Yuanjie

0 Kudos
Reply