Note that there are some explanatory texts on larger screens.

plurals
  1. PODevice Fission Intel CPU
    primarykey
    data
    text
    <p>I'm trying to write an opencl program using the device fission extension.</p> <p>I'm using an Intel i3 M350, but I'm not able to create sub devices:</p> <pre><code>#define USE_CL_DEVICE_FISSION 1 #include &lt;iostream&gt; #include "CL/cl.hpp" using namespace std; int main(int argc, char* argv[]) { cl::Context context; std::vector&lt;cl::Platform&gt; platforms; cl::Platform::get(&amp;platforms); cl_context_properties properties[] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(platforms[1])(), 0 }; context = cl::Context(CL_DEVICE_TYPE_CPU, properties); std::vector&lt;cl::Device&gt; devices = context.getInfo&lt;CL_CONTEXT_DEVICES&gt;(); cout &lt;&lt; "Platform:\t" &lt;&lt; platforms[1].getInfo&lt;CL_PLATFORM_NAME&gt;() &lt;&lt; endl; cout &lt;&lt; "Version:\t" &lt;&lt; platforms[1].getInfo&lt;CL_PLATFORM_VERSION&gt;() &lt;&lt; endl; cout &lt;&lt; "Device:\t\t" &lt;&lt; devices[0].getInfo&lt;CL_DEVICE_NAME&gt;() &lt;&lt; endl; cout &lt;&lt; "Profile:\t" &lt;&lt; devices[0].getInfo&lt;CL_DEVICE_PROFILE&gt;() &lt;&lt; endl; cout &lt;&lt; "Driver:\t\t" &lt;&lt; devices[0].getInfo&lt;CL_DRIVER_VERSION&gt;() &lt;&lt; endl; cout &lt;&lt; "ComputeUnits:\t" &lt;&lt; devices[0].getInfo&lt;CL_DEVICE_MAX_COMPUTE_UNITS &gt;() &lt;&lt; endl; if (devices[0].getInfo&lt;CL_DEVICE_EXTENSIONS&gt;().find("cl_ext_device_fission") == std::string::npos) { cout &lt;&lt; "No device fission support!" &lt;&lt; endl; exit(-1); } else { cout &lt;&lt; "Device Fission: Available" &lt;&lt; endl; } const cl_device_partition_property_ext subDeviceProperties[] = { CL_DEVICE_PARTITION_EQUALLY_EXT, 1, CL_PROPERTIES_LIST_END_EXT, 0 }; std::vector&lt;cl::Device&gt; subDevices; int err = devices[0].createSubDevices(subDeviceProperties, &amp;subDevices); if (err != CL_SUCCESS) { cout &lt;&lt; "\nError: " &lt;&lt; err &lt;&lt; endl; } } </code></pre> <p>The output is:</p> <pre><code>Platform: Intel(R) OpenCL Version: OpenCL 1.1 LINUX Device: Intel(R) Core(TM) i3 CPU M 350 @ 2.27GHz Profile: FULL_PROFILE Driver: 1.1 ComputeUnits: 4 Device Fission: Available Error: -1057 </code></pre> <p>This error code stands for:</p> <blockquote> <p>CL_DEVICE_PARTITION_FAILED_EXT -1057</p> <pre><code>Returned by clCreateSubDevicesEXT when the total number of compute units requested exceeds CL_DEVICE_MAX_COMPUTE_UNITS, or the number of compute units for any one sub-device is less than 1. </code></pre> </blockquote> <p>Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload