<?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 Re: Device Capability Query in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1272876#M1082</link>
    <description>&lt;P&gt;One additional issue (until the next one) is if double precision is implemented in hardware as opposed to a software implementation. For example, some of the older GPUs (though I suppose will not be supported by SYCL) had limited or no DP support. I am just guessing that some of the newer ones have better, but yet limited support. For example lacking hardware sqrt, sin, cos, etc...&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
    <pubDate>Mon, 12 Apr 2021 12:41:07 GMT</pubDate>
    <dc:creator>jimdempseyatthecove</dc:creator>
    <dc:date>2021-04-12T12:41:07Z</dc:date>
    <item>
      <title>Device Capability Query</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1271258#M1070</link>
      <description>&lt;P&gt;I am aware that I can identify a device by name or vendor but is there a (generic) way to obtain:&lt;/P&gt;
&lt;P&gt;a list (bitmap) of features supported by the device. In particular does it have native support for double precision floating point?&lt;/P&gt;
&lt;P&gt;Having a uniform/generic method would help to future proof an application (as opposed to using a table of device/vendor names at the time of writing the application)&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 14:54:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1271258#M1070</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2021-04-06T14:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Device Capability Query</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1271574#M1072</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;To get the details of the supported features you can query your particular selected device for all the supported features using the&lt;STRONG&gt; get_info&lt;/STRONG&gt; member function. There are multiple device descriptors that will give details regarding a particular feature. Some of the examples of the descriptors are:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;device_type, vendor_id, max_compute_units,&amp;nbsp;max_work_item_sizes, max_work_group_size, preferred_vector_width_float,&amp;nbsp;preferred_vector_width_double,&amp;nbsp;native_vector_width_long,&amp;nbsp;native_vector_width_float,&amp;nbsp;native_vector_width_double,&amp;nbsp;native_vector_width_half,&amp;nbsp;max_clock_frequency,&amp;nbsp;address_bits,&amp;nbsp;max_mem_alloc_size,&amp;nbsp;double_fp_config,&amp;nbsp;global_mem_cache_type,&amp;nbsp;global_mem_cache_line_size,&amp;nbsp;global_mem_size,&amp;nbsp;max_constant_buffer_size, max_constant_args,&lt;/STRONG&gt; etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use these device descriptors to get the values of a particular feature and use them accordingly in the application. For more details please refer to the below link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.oneapi.com/versions/latest/dpcpp/iface/device.html#device-info" target="_blank" rel="noopener"&gt;https://docs.oneapi.com/versions/latest/dpcpp/iface/device.html#device-info&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also please go through the below sample for simple usage.&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;
#include &amp;lt;iostream&amp;gt;

#define PROP_NAME(_x) #_x
#define PRINT_DEVICE_PROPERTY(dev, prop) \
  std::cout &amp;lt;&amp;lt; PROP_NAME(prop) &amp;lt;&amp;lt; ": " \
            &amp;lt;&amp;lt; dev.get_info&amp;lt;cl::sycl::info::device::prop&amp;gt;() &amp;lt;&amp;lt; std::endl;

int main(int, char**) {
      
        sycl::gpu_selector selector;
        sycl::device device = sycl::device(selector);
        auto&amp;amp; dev = device;
        PRINT_DEVICE_PROPERTY(dev, name);
        PRINT_DEVICE_PROPERTY(dev, vendor);
        PRINT_DEVICE_PROPERTY(dev, driver_version);
        PRINT_DEVICE_PROPERTY(dev, profile);
        PRINT_DEVICE_PROPERTY(dev, version);
        PRINT_DEVICE_PROPERTY(dev, opencl_c_version);
        PRINT_DEVICE_PROPERTY(dev, max_compute_units);
        PRINT_DEVICE_PROPERTY(dev, max_work_item_dimensions);
        PRINT_DEVICE_PROPERTY(dev, preferred_vector_width_short);
        PRINT_DEVICE_PROPERTY(dev, preferred_vector_width_int);
        PRINT_DEVICE_PROPERTY(dev, preferred_vector_width_double);
        PRINT_DEVICE_PROPERTY(dev, preferred_vector_width_half);
        PRINT_DEVICE_PROPERTY(dev, native_vector_width_char);
        PRINT_DEVICE_PROPERTY(dev, native_vector_width_int);
        PRINT_DEVICE_PROPERTY(dev, native_vector_width_float);
        PRINT_DEVICE_PROPERTY(dev, native_vector_width_double);
        PRINT_DEVICE_PROPERTY(dev, native_vector_width_half);
        PRINT_DEVICE_PROPERTY(dev, local_mem_size);
        PRINT_DEVICE_PROPERTY(dev, global_mem_cache_line_size);
        PRINT_DEVICE_PROPERTY(dev, global_mem_cache_size);
        PRINT_DEVICE_PROPERTY(dev, global_mem_size);
        PRINT_DEVICE_PROPERTY(dev, max_constant_buffer_size);
        PRINT_DEVICE_PROPERTY(dev, max_constant_args);

        return 0;
}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope the provided details will help you, also give us a confirmation on whether it's the same details that you are expecting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;/P&gt;
&lt;P&gt;Abhishek&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 12:08:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1271574#M1072</guid>
      <dc:creator>AbhishekD_Intel</dc:creator>
      <dc:date>2021-04-07T12:08:12Z</dc:date>
    </item>
    <item>
      <title>Re:Device Capability Query</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1272762#M1078</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the confirmation, glad to know that the provided details helped you.&lt;/P&gt;&lt;P&gt;As the issue is resolved we will no longer monitor this thread. Please post a new thread if you have any other issues.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Apr 2021 06:54:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1272762#M1078</guid>
      <dc:creator>AbhishekD_Intel</dc:creator>
      <dc:date>2021-04-12T06:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Device Capability Query</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1272876#M1082</link>
      <description>&lt;P&gt;One additional issue (until the next one) is if double precision is implemented in hardware as opposed to a software implementation. For example, some of the older GPUs (though I suppose will not be supported by SYCL) had limited or no DP support. I am just guessing that some of the newer ones have better, but yet limited support. For example lacking hardware sqrt, sin, cos, etc...&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 12:41:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1272876#M1082</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2021-04-12T12:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Device Capability Query</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1272880#M1084</link>
      <description>&lt;P&gt;I do see sycl::info::fp_config has fp_config for half_fp_config, single_fp_config and double_fp_config.&lt;/P&gt;
&lt;P&gt;Does the bit field soft_float indicate that the selected class of fp is performed via software as opposed to hardware?&lt;/P&gt;
&lt;P&gt;While fma is included, the other feature sets, as provided say by AVX... are not detectable.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 12:51:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Device-Capability-Query/m-p/1272880#M1084</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2021-04-12T12:51:07Z</dc:date>
    </item>
  </channel>
</rss>

