<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hi Yaknan, in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007042#M2965</link>
    <description>Hi Yaknan,

If you have not already done so, please download and install Intel HD Graphics driver from &lt;A href="https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&amp;amp;ProdId=3720" target="_blank"&gt;https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&amp;amp;ProdId=3720&lt;/A&gt;. It contains OpenCL runtime both for Intel CPU and GPU.

In your application make sure that you choose Intel OpenCL platform (by CL_PLATFORM_NAME or CL_PLATFORM_VENDOR). This is necessary since you have also NVidia Graphics card and it's quite possible that it shows up as another OpenCL platform with the GPU device only.

Thanks,
Yuri</description>
    <pubDate>Tue, 22 Jul 2014 14:15:00 GMT</pubDate>
    <dc:creator>Yuri_K_Intel</dc:creator>
    <dc:date>2014-07-22T14:15:00Z</dc:date>
    <item>
      <title>CL_DEVICE_TYPE_CPU  not working in Windows 8.1</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007041#M2964</link>
      <description>&lt;P&gt;Hi, I recently tried to run my OpenCL program on a new windows 8.1 computer but the program returns an error when the device type is CL_DEVICE_TYPE_CPU. When I change the device type to a CL_DEVICE_TYPE_GPU or CL_DEVICE_TYPE_ ALL it ran the program on the GPU. Here is the system specification of the new computer: OS: Windows 8.1 Processor: Intel Core i7 - 4700MQ clocked at 2.40GHz Display Adapter: Intel HD Graphic 4600 and NVIDIA GeForce GT 740M How can I resolve this problem and is OpenCL having issues with windows 8.1? Please help! Yaknan&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2014 13:37:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007041#M2964</guid>
      <dc:creator>Yaknan_G_</dc:creator>
      <dc:date>2014-07-22T13:37:20Z</dc:date>
    </item>
    <item>
      <title>Hi Yaknan,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007042#M2965</link>
      <description>Hi Yaknan,

If you have not already done so, please download and install Intel HD Graphics driver from &lt;A href="https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&amp;amp;ProdId=3720" target="_blank"&gt;https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&amp;amp;ProdId=3720&lt;/A&gt;. It contains OpenCL runtime both for Intel CPU and GPU.

In your application make sure that you choose Intel OpenCL platform (by CL_PLATFORM_NAME or CL_PLATFORM_VENDOR). This is necessary since you have also NVidia Graphics card and it's quite possible that it shows up as another OpenCL platform with the GPU device only.

Thanks,
Yuri</description>
      <pubDate>Tue, 22 Jul 2014 14:15:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007042#M2965</guid>
      <dc:creator>Yuri_K_Intel</dc:creator>
      <dc:date>2014-07-22T14:15:00Z</dc:date>
    </item>
    <item>
      <title>Hi Yuri,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007043#M2966</link>
      <description>&lt;P&gt;Hi Yuri,&lt;/P&gt;

&lt;P&gt;Thank you for your prompt response. I visited the link you provided and searched for the latest driver and tried to install but it won't install. It prompted&amp;nbsp;&lt;STRONG&gt;"The Driver being installed is not validated for this computer. Please obtain the appropriate driver from your computer manufacturer."&amp;nbsp;&lt;/STRONG&gt;Also how do you suggest I choose Intel openCl Platform by&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;&amp;nbsp;CL_PLATFORM_NAME or CL_PLATFORM_VENDOR from the code excerpt below:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;	// Init CPU device
	m_DeviceCPU= NULL;
	 m_DeviceGPU= NULL;
	 kernel=NULL;
	 cl_platform_id platform_id= NULL;
	m_raytraceKernelWorkGroupSize= NULL;
	cl_uint ret_num_devices=0;
	cl_uint ret_num_platforms=0;
	cl_int err = 0;

	
	/* Get Platform and Device Info */
	err = clGetPlatformIDs(1, &amp;amp;platform_id, &amp;amp;ret_num_platforms);

	
	// Find the CPU CL device, as a fallback
	err = clGetDeviceIDs(platform_id, &lt;STRONG&gt;CL_DEVICE_TYPE_ALL&lt;/STRONG&gt;, 1, &amp;amp;m_DeviceCPU, &amp;amp;ret_num_devices);
	assert(err == CL_SUCCESS);
	if(err==CL_SUCCESS){
		device_stats(m_DeviceCPU);
	}
	&lt;/PRE&gt;

&lt;P&gt;As the program does not see CL_DEVICE_TYPE_CPU. It returns only for GPU.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Yaknan&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 11:56:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007043#M2966</guid>
      <dc:creator>Yaknan_G_</dc:creator>
      <dc:date>2014-08-04T11:56:20Z</dc:date>
    </item>
    <item>
      <title>In your code you take the 1st</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007044#M2967</link>
      <description>In your code you take the 1st available OpenCL platform by the call to:
&lt;PRE class="brush:cpp"&gt;err = clGetPlatformIDs(1, &amp;amp;platform_id, &amp;amp;ret_num_platforms);&lt;/PRE&gt;

In a general case (when multiple OpenCL platforms might be installed from different vendors) you should first query the number of available platforms and get all of them:
&lt;PRE class="brush:cpp"&gt;
    cl_uint num_of_platforms = 0;
    // get total number of available platforms:
    cl_int err = clGetPlatformIDs(0, 0, &amp;amp;num_of_platforms);
    SAMPLE_CHECK_ERRORS(err);

    // use vector for automatic memory management
    vector&lt;CL_PLATFORM_ID&gt; platforms(num_of_platforms);
    // get IDs for all platforms:
    err = clGetPlatformIDs(num_of_platforms, &amp;amp;platforms[0], 0);
    SAMPLE_CHECK_ERRORS(err);
&lt;/CL_PLATFORM_ID&gt;&lt;/PRE&gt;
And then select the required one. You may also find this code in samples at &lt;A href="https://software.intel.com/en-us/vcsource/tools/opencl-sdk" target="_blank"&gt;https://software.intel.com/en-us/vcsource/tools/opencl-sdk&lt;/A&gt;. Look at common\oclobject.cpp, selectPlatform function.

What is the number of platforms on your system? What are the name/vendor of the platforms? I.e. what are return values of clGetPlatformInfo with CL_PLATFORM_NAME and CL_PLATFORM_VENDOR queries?</description>
      <pubDate>Wed, 06 Aug 2014 10:30:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007044#M2967</guid>
      <dc:creator>Yuri_K_Intel</dc:creator>
      <dc:date>2014-08-06T10:30:42Z</dc:date>
    </item>
    <item>
      <title>Hi Yuri,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007045#M2968</link>
      <description>&lt;P&gt;Hi Yuri,&lt;/P&gt;

&lt;P&gt;I got around your suggestions and queried all the available platforms using the code below but the Platform for the CPU does not show:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;	err = clGetPlatformIDs(0, 0, &amp;amp;ret_num_platforms);

	 cl_platform_id* platforms = new cl_platform_id[ret_num_platforms];

	 err = clGetPlatformIDs(ret_num_platforms, platforms, NULL);

				for (cl_uint ui=0; ui&amp;lt; ret_num_platforms; ++ui)
				{
						err = clGetPlatformInfo(platforms[ui], CL_PLATFORM_NAME, 128 * sizeof(char), platform_name, NULL);
						err = clGetPlatformInfo(platforms[ui], CL_PLATFORM_VENDOR, 128 * sizeof(char), vendor_names, NULL);
						err = clGetPlatformInfo(platforms[ui], CL_PLATFORM_PROFILE, 128 * sizeof(char), platform_profile, NULL);
						err = clGetPlatformInfo(platforms[ui], CL_PLATFORM_VERSION, 128 * sizeof(char), platform_version, NULL);
						
						if (CL_SUCCESS == err) 
						{
								// handle error
								//Printing available platforms and ids to a file
										FILE *outFile;
										outFile = fopen("Platforms.out", "a+");
											if (!outFile){
											printf("Cannot open output file.\n");
											exit(2); 
											}

									   fprintf(outFile,"Platform_ID = %d\n",ui);
									   fprintf(outFile,"Platform_Name:%s\n",platform_name);
									   fprintf(outFile,"Platform_Vendor_Name:%s\n",vendor_names);
									    fprintf(outFile,"Platform_Profile:%s\n",platform_profile);
									   fprintf(outFile,"Platform_Version:%s\n",platform_version);
									  
									 //  return;
						}

				}

   	
	// Find the CPU CL device, as a fallback
	err = clGetDeviceIDs(platforms[2], CL_DEVICE_TYPE_CPU, 1, &amp;amp;m_DeviceCPU, &amp;amp;ret_num_devices);&lt;/PRE&gt;

&lt;P&gt;So, after much reading I released that the issue is from the OpenCL version. I downloaded the latest version OpenCL 2.0 &amp;nbsp;2014 release from Intel (Test only release) from the link &lt;A href="https://software.intel.com/en-us/intel-opencl"&gt;here&lt;/A&gt; and the Platform with the CPU comes up and the CL_DEVICE_TYPE_CPU ran smoothly.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Yaknan&lt;/P&gt;</description>
      <pubDate>Thu, 25 Sep 2014 22:24:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/CL-DEVICE-TYPE-CPU-not-working-in-Windows-8-1/m-p/1007045#M2968</guid>
      <dc:creator>Yaknan_G_</dc:creator>
      <dc:date>2014-09-25T22:24:41Z</dc:date>
    </item>
  </channel>
</rss>

