<?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:Using fsycl-link in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-fsycl-link/m-p/1273477#M1115</link>
    <description>&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;&lt;P&gt;Could you please share a small reproducer and steps to reproduce the issues (compilation and linking commands used).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 14 Apr 2021 10:25:56 GMT</pubDate>
    <dc:creator>VidyalathaB_Intel</dc:creator>
    <dc:date>2021-04-14T10:25:56Z</dc:date>
    <item>
      <title>Using fsycl-link</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-fsycl-link/m-p/1273171#M1113</link>
      <description>&lt;P&gt;Using Intel 2021.2 from oneapi-hpckit docker image.&lt;/P&gt;
&lt;P&gt;I'm attempting to follow the documentation here:&amp;nbsp;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/use-a-third-party-compiler-as-a-host-compiler-for-dpc-code.html" target="_blank"&gt;https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/use-a-third-party-compiler-as-a-host-compiler-for-dpc-code.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;but am running into a few issues:&lt;/P&gt;
&lt;P&gt;1. The generated header seems to be specialising a type that doesn't exist:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;In file included from &amp;lt;command-line&amp;gt;:0:0:
./a_host.h:27:20: error: 'KernelInfoData' is not a class template
 template &amp;lt;&amp;gt; struct KernelInfoData&amp;lt;'_', 'Z', 'T', 'S', 'Z', 'Z', '4', 'm', 'a', 'i', 'n', 'E', 'N', 'K', 'U', 'l', 'R', 'N', '2', 'c', 'l', '4', 's', 'y', 'c', 'l', '7', 'h', 'a', 'n', 'd', 'l', 'e', 'r', 'E', 'E', '1', '1', '_', '2', '0', 'c', 'l', 'E', 'S', '2', '_', 'E', 'U', 'l', 'N', 'S', '0', '_', '4', 'i', 't', 'e', 'm', 'I', 'L', 'i', '1', 'E', 'L', 'b', '1', 'E', 'E', 'E', 'E', '1', '3', '_', '2', '7'&amp;gt; {
                    ^~~~~~~~~~~~~~
In file included from &amp;lt;command-line&amp;gt;:0:0:
./a_host.h:27:415: error: explicit specialization of non-template 'cl::sycl::detail::KernelInfoData'
 ', 'l', 'E', 'S', '2', '_', 'E', 'U', 'l', 'N', 'S', '0', '_', '4', 'i', 't', 'e', 'm', 'I', 'L', 'i', '1', 'E', 'L', 'b', '1', 'E', 'E', 'E', 'E', '1', '3', '_', '2', '7'&amp;gt; {
                                                                                                                                                                              ^&lt;/LI-CODE&gt;
&lt;P&gt;2. CL_TARGET_OPENCL_VERSION is not defined:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;In file included from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/cl.h:20:0,
                 from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/cl_ext_intel.h:44,
                 from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl/detail/common.hpp:11,
                 from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl/access/access.hpp:10,
                 from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl/ONEAPI/atomic_enums.hpp:12,
                 from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl/ONEAPI/atomic_accessor.hpp:11,
                 from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl/ONEAPI/atomic.hpp:11,
                 from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl.hpp:11,
                 from sample.cc:1:
/opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/cl_version.h:22:104: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)
 #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
                                                                                                        ^&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. The linked device.o file only contains sycl symbols and none of the compiled kernels:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;$ nm -A device.o
device.o:0000000000000000 r .sycl_offloading.0.data
device.o:0000000000000000 r .sycl_offloading.0.data.size
device.o:0000000000000060 d .sycl_offloading.descriptor
device.o:0000000000000000 d .sycl_offloading.device_images
device.o:0000000000000007 r .sycl_offloading.opts.compile.0
device.o:0000000000000008 r .sycl_offloading.opts.link.0
device.o:0000000000000000 r .sycl_offloading.target.0
device.o:                 U __sycl_register_lib
device.o:                 U __sycl_unregister_lib
device.o:0000000000000000 t sycl.descriptor_reg
device.o:0000000000000010 t sycl.descriptor_unreg&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any updated documentation on how the -fsycl-link flag should be used as it currently seems broken?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 08:46:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-fsycl-link/m-p/1273171#M1113</guid>
      <dc:creator>James_S_9</dc:creator>
      <dc:date>2021-04-13T08:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using fsycl-link</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-fsycl-link/m-p/1273191#M1114</link>
      <description>&lt;P&gt;The first error seems to be due to&amp;nbsp;__SYCL_UNNAMED_LAMBDA__ not being defined when compiling with g++ as KernelInfoData only exists when that is turned on.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 10:22:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-fsycl-link/m-p/1273191#M1114</guid>
      <dc:creator>James_S_9</dc:creator>
      <dc:date>2021-04-13T10:22:29Z</dc:date>
    </item>
    <item>
      <title>Re:Using fsycl-link</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-fsycl-link/m-p/1273477#M1115</link>
      <description>&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;&lt;P&gt;Could you please share a small reproducer and steps to reproduce the issues (compilation and linking commands used).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Apr 2021 10:25:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-fsycl-link/m-p/1273477#M1115</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2021-04-14T10:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Using fsycl-link</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-fsycl-link/m-p/1273480#M1116</link>
      <description>&lt;P&gt;The commands are as in the documentation as stated in my original post:&amp;nbsp;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/use-a-third-party-compiler-as-a-host-compiler-for-dpc-code.html" target="_blank"&gt;https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-gui...&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I was just using a single file though:&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;
#include &amp;lt;iostream&amp;gt;

constexpr int num = 16;
using namespace sycl;

int main() {
    auto r = range{num};
    buffer&amp;lt;int&amp;gt; a{r};

    queue{}.submit([&amp;amp;](handler&amp;amp; h) {
        accessor out{a, h};
        h.parallel_for(r, [=](item&amp;lt;1&amp;gt; idx) { out[idx] = idx; });
    });

    host_accessor result{a};
    for(int i = 0; i &amp;lt; num; ++i)
        std::cout &amp;lt;&amp;lt; result[i] &amp;lt;&amp;lt; "\n";
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The integration header generated by this file gives the errors described in my original post.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 10:32:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-fsycl-link/m-p/1273480#M1116</guid>
      <dc:creator>James_S_9</dc:creator>
      <dc:date>2021-04-14T10:32:39Z</dc:date>
    </item>
  </channel>
</rss>

