OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1719 Discussions

I can't find my GPU, some one could help?

zhang_f_
Beginner
219 Views

Hello,

I use the Ubuntu14.04 system. My hardware is CPU  i7-4770 and GPU HD 4600. But I can not find the GPU. I want to ask 2 questions:

 

1.I want to use OpenCL to control both the device, but it can not recognize the GPU. Do I have to install the GPU driver first?

I only intalled the "intel_sdk_for_ocl_applications_2014_ubuntu_4.6.0.92_x64".

 

2.If I have to install the GPU driver, why there is not any Ubuntu version? or linux version? but only windows version?

 

DRIVER LINK:

https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=24348

 

Thanks.

 

The code I use is as follows:

 

188    //Get Device IDs for the OpenCL* accelerators attached to the host
189    err = clGetDeviceIDs(*myPlatform, CL_DEVICE_TYPE_ALL, MAX_NUM_DEVICE_SUPPORTED,accelerator,numAcc    Count);
190 
191    //If the number of coprocessor is larger than supported coprocessor then change numAccCount
192    if((*numAccCount)>MAX_NUM_DEVICE_SUPPORTED) 
193         (*numAccCount)=MAX_NUM_DEVICE_SUPPORTED;
194         
195    //For each accelerator find the properties of the name and number of cores of the accelerator 
196    for (int i=0; i<(*numAccCount); i++)
197    {
198       //Get the Device Name
199       size_t device_name_length;
200       err=clGetDeviceInfo(accelerator, CL_DEVICE_NAME,0,0,&device_name_length);
201       char* device_name = new char[device_name_length]; 
202       err=clGetDeviceInfo(accelerator, CL_DEVICE_NAME,device_name_length,(void*)device_name,0);
203       
204       //Get the number of Compute Units
205       cl_uint num_compute_units;
206       err = clGetDeviceInfo(accelerator, CL_DEVICE_MAX_COMPUTE_UNITS,sizeof(cl_uint), &num_comput    e_units, NULL);
207       
208       printf("\nDEVICE #%d:\nNAME:%s\n#COMPUTE UNITS:%d\n",i,device_name,num_compute_units);
209       
210       delete device_name;
211    }  

I use the clinfo command but also only see the CPU.

0 Kudos
0 Replies
Reply