<?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 How to Run oneAPI Ported DPC++ Code on Nvidia GPU in Migrating to SYCL</title>
    <link>https://community.intel.com/t5/Migrating-to-SYCL/How-to-Run-oneAPI-Ported-DPC-Code-on-Nvidia-GPU/m-p/1604689#M302</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I recently ported a CUDA project to DPC++ using oneAPI and successfully ran it on an Intel GPU. Now, I would like to run the same project on an Nvidia GPU on Windows to compare performance. How can I achieve this?&lt;/P&gt;&lt;P&gt;I tried using the following code to target the Nvidia GPU, but it did not recognize the NVIDIA GeForce RTX 3060 on my computer.&lt;/P&gt;&lt;P&gt;The code is attached below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;std::vector&amp;lt;platform&amp;gt; platforms = platform::get_platforms();&lt;BR /&gt;for (const auto&amp;amp; plt : platforms) {&lt;BR /&gt;std::string platform_name = plt.get_info&amp;lt;info::platform::name&amp;gt;();&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "Platform: " &amp;lt;&amp;lt; platform_name &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;std::vector&amp;lt;device&amp;gt; devices = plt.get_devices();&lt;BR /&gt;for (const auto&amp;amp; dev : devices) {&lt;BR /&gt;if (dev.is_gpu()) {&lt;BR /&gt;std::string device_name = dev.get_info&amp;lt;info::device::name&amp;gt;();&lt;BR /&gt;std::string device_vendor = dev.get_info&amp;lt;info::device::vendor&amp;gt;();&lt;BR /&gt;std::string driver_version = dev.get_info&amp;lt;info::device::driver_version&amp;gt;();&lt;BR /&gt;std::cout &amp;lt;&amp;lt; " GPU Device: " &amp;lt;&amp;lt; device_name &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;std::cout &amp;lt;&amp;lt; " Vendor: " &amp;lt;&amp;lt; device_vendor &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;std::cout &amp;lt;&amp;lt; " Driver Version: " &amp;lt;&amp;lt; driver_version &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2024 03:32:00 GMT</pubDate>
    <dc:creator>-Light-</dc:creator>
    <dc:date>2024-06-07T03:32:00Z</dc:date>
    <item>
      <title>How to Run oneAPI Ported DPC++ Code on Nvidia GPU</title>
      <link>https://community.intel.com/t5/Migrating-to-SYCL/How-to-Run-oneAPI-Ported-DPC-Code-on-Nvidia-GPU/m-p/1604689#M302</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I recently ported a CUDA project to DPC++ using oneAPI and successfully ran it on an Intel GPU. Now, I would like to run the same project on an Nvidia GPU on Windows to compare performance. How can I achieve this?&lt;/P&gt;&lt;P&gt;I tried using the following code to target the Nvidia GPU, but it did not recognize the NVIDIA GeForce RTX 3060 on my computer.&lt;/P&gt;&lt;P&gt;The code is attached below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;std::vector&amp;lt;platform&amp;gt; platforms = platform::get_platforms();&lt;BR /&gt;for (const auto&amp;amp; plt : platforms) {&lt;BR /&gt;std::string platform_name = plt.get_info&amp;lt;info::platform::name&amp;gt;();&lt;BR /&gt;std::cout &amp;lt;&amp;lt; "Platform: " &amp;lt;&amp;lt; platform_name &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;std::vector&amp;lt;device&amp;gt; devices = plt.get_devices();&lt;BR /&gt;for (const auto&amp;amp; dev : devices) {&lt;BR /&gt;if (dev.is_gpu()) {&lt;BR /&gt;std::string device_name = dev.get_info&amp;lt;info::device::name&amp;gt;();&lt;BR /&gt;std::string device_vendor = dev.get_info&amp;lt;info::device::vendor&amp;gt;();&lt;BR /&gt;std::string driver_version = dev.get_info&amp;lt;info::device::driver_version&amp;gt;();&lt;BR /&gt;std::cout &amp;lt;&amp;lt; " GPU Device: " &amp;lt;&amp;lt; device_name &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;std::cout &amp;lt;&amp;lt; " Vendor: " &amp;lt;&amp;lt; device_vendor &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;std::cout &amp;lt;&amp;lt; " Driver Version: " &amp;lt;&amp;lt; driver_version &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 03:32:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Migrating-to-SYCL/How-to-Run-oneAPI-Ported-DPC-Code-on-Nvidia-GPU/m-p/1604689#M302</guid>
      <dc:creator>-Light-</dc:creator>
      <dc:date>2024-06-07T03:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to Run oneAPI Ported DPC++ Code on Nvidia GPU</title>
      <link>https://community.intel.com/t5/Migrating-to-SYCL/How-to-Run-oneAPI-Ported-DPC-Code-on-Nvidia-GPU/m-p/1671803#M330</link>
      <description>&lt;P&gt;Hi, coldplay provides CUDA plugin for dpc++ compiler, you may need to install this plugin and make sure sycl-ls can find cuda backend like below. sycl-ls is a utility provide in oneapi basekit.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$ sycl-ls
[cuda:gpu][cuda:0] NVIDIA CUDA BACKEND, NVIDIA A100 80GB PCIe 8.0 [CUDA 12.7]
&lt;/LI-CODE&gt;
&lt;P&gt;During compilation you may need to add one more option to target NVIDIA gpu,&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-shell hljs"&gt;-fsycl-targets=nvptx64-nvidia-cuda&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;More details can be found&amp;nbsp;&lt;A href="https://developer.codeplay.com/products/oneapi/nvidia/2025.0.0/guides/get-started-guide-nvidia" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 20:53:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Migrating-to-SYCL/How-to-Run-oneAPI-Ported-DPC-Code-on-Nvidia-GPU/m-p/1671803#M330</guid>
      <dc:creator>yzh_intel</dc:creator>
      <dc:date>2025-03-03T20:53:16Z</dc:date>
    </item>
  </channel>
</rss>

