<?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 train yolov8 using intel arc 770 gpu? in GPU Compute Software</title>
    <link>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1597471#M1418</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I bought an Intel Arc 770 with a 13th gen CPU desktop to use for training the YOLOv8 model. However, I couldn't find a way to use it. There is an option for CUDA, but not for the Arc 770. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnkim7_0-1715667434382.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/54683iD369512CC8C91401/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="johnkim7_0-1715667434382.png" alt="johnkim7_0-1715667434382.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;@https://docs.ultralytics.com/modes/train/#usage-examples&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using a Python Jupyter notebook. Can anyone help with this?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2024 06:17:48 GMT</pubDate>
    <dc:creator>johnkim7</dc:creator>
    <dc:date>2024-05-14T06:17:48Z</dc:date>
    <item>
      <title>How to train yolov8 using intel arc 770 gpu?</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1597471#M1418</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I bought an Intel Arc 770 with a 13th gen CPU desktop to use for training the YOLOv8 model. However, I couldn't find a way to use it. There is an option for CUDA, but not for the Arc 770. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnkim7_0-1715667434382.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/54683iD369512CC8C91401/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="johnkim7_0-1715667434382.png" alt="johnkim7_0-1715667434382.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;@https://docs.ultralytics.com/modes/train/#usage-examples&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using a Python Jupyter notebook. Can anyone help with this?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 06:17:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1597471#M1418</guid>
      <dc:creator>johnkim7</dc:creator>
      <dc:date>2024-05-14T06:17:48Z</dc:date>
    </item>
    <item>
      <title>Re:How to train yolov8 using intel arc 770 gpu?</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1599769#M1432</link>
      <description>&lt;P&gt;&lt;A href="https://community.intel.com/t5/user/viewprofilepage/user-id/357057" rel="noopener noreferrer" target="_blank"&gt;Hello J&lt;/A&gt;&lt;A href="https://community.intel.com/t5/user/viewprofilepage/user-id/13973" rel="noopener noreferrer" target="_blank"&gt;ohnkim7,&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for posting in our communities.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We will do further research on this matter and post the response on this thread once it is available.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for your patience and understanding!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;CarmonaA.&lt;/P&gt;&lt;P&gt;Intel Customer Support Technician&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 May 2024 11:52:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1599769#M1432</guid>
      <dc:creator>ACarmona_Intel</dc:creator>
      <dc:date>2024-05-22T11:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to train yolov8 using intel arc 770 gpu?</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1601564#M1442</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Using an Intel Arc GPU, such as the Arc 770, for training machine learning models like YOLOv8 in a Python Jupyter notebook can be challenging, particularly because most popular deep learning frameworks, such as TensorFlow and PyTorch, are optimized for NVIDIA GPUs using CUDA. Intel has its own set of tools and libraries for GPU computing, and integrating these into your workflow will require using Intel's software stack. Here’s how you can proceed:&lt;/P&gt;&lt;H3&gt;1. Install Intel OneAPI Toolkits&lt;/H3&gt;&lt;P&gt;Intel OneAPI provides a comprehensive set of tools for data-centric workloads. For using Intel GPUs, you'll need the Intel OneAPI Base Toolkit and the Intel OneAPI AI Analytics Toolkit.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Download and Install Intel OneAPI Toolkits:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Go to the &lt;A target="_new" rel="noreferrer"&gt;Intel OneAPI Toolkits page&lt;/A&gt; and download the Base Toolkit and AI Analytics Toolkit.&lt;/LI&gt;&lt;LI&gt;Follow the installation instructions provided on the site.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Set Up the Environment:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;After installation, set up the environment by sourcing the setvars.sh script. This script is usually located in the installation directory.&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;bash&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Copy code&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;source&lt;/SPAN&gt; /opt/intel/oneapi/setvars.sh&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;2. Install Intel Extension for PyTorch&lt;/H3&gt;&lt;P&gt;Intel provides an extension for PyTorch to enable optimized performance on Intel hardware.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Install the Extension:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You can install the Intel Extension for PyTorch using pip:&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;bash&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Copy code&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;pip install intel-extension-for-pytorch&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Modify Your PyTorch Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;To use Intel hardware, you need to import the extension and set the appropriate device.&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;python&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Copy code&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;import&lt;/SPAN&gt; torch &lt;SPAN class=""&gt;import&lt;/SPAN&gt; intel_extension_for_pytorch &lt;SPAN class=""&gt;as&lt;/SPAN&gt; ipex device = torch.device(&lt;SPAN class=""&gt;'xpu'&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; torch.xpu.is_available() &lt;SPAN class=""&gt;else&lt;/SPAN&gt; &lt;SPAN class=""&gt;'cpu'&lt;/SPAN&gt;) &lt;SPAN class=""&gt;# Your model definition&lt;/SPAN&gt; model = YourModel().to(device) &lt;SPAN class=""&gt;# Optimizer and loss function&lt;/SPAN&gt; optimizer = torch.optim.Adam(model.parameters()) loss_fn = torch.nn.CrossEntropyLoss() &lt;SPAN class=""&gt;# Training loop&lt;/SPAN&gt; &lt;SPAN class=""&gt;for&lt;/SPAN&gt; epoch &lt;SPAN class=""&gt;in&lt;/SPAN&gt; &lt;SPAN class=""&gt;range&lt;/SPAN&gt;(num_epochs): &lt;SPAN class=""&gt;for&lt;/SPAN&gt; data, target &lt;SPAN class=""&gt;in&lt;/SPAN&gt; train_loader: data, target = data.to(device), target.to(device) optimizer.zero_grad() output = model(data) loss = loss_fn(output, target) loss.backward() optimizer.step()&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;3. Training YOLOv8&lt;/H3&gt;&lt;P&gt;If you are specifically using YOLOv8, which is implemented using PyTorch, you can adapt the example code above to ensure that it utilizes Intel's hardware.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Install YOLOv8 and Dependencies:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Ensure you have the required dependencies installed:&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;bash&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Copy code&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;pip install ultralytics&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Modify YOLOv8 Code to Use Intel GPU:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adapt the YOLOv8 training script to utilize the Intel GPU.&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;python&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Copy code&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; ultralytics &lt;SPAN class=""&gt;import&lt;/SPAN&gt; YOLO &lt;SPAN class=""&gt;import&lt;/SPAN&gt; torch &lt;SPAN class=""&gt;import&lt;/SPAN&gt; intel_extension_for_pytorch &lt;SPAN class=""&gt;as&lt;/SPAN&gt; ipex &lt;SPAN class=""&gt;# Check for Intel GPU availability&lt;/SPAN&gt; device = torch.device(&lt;SPAN class=""&gt;'xpu'&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; torch.xpu.is_available() &lt;SPAN class=""&gt;else&lt;/SPAN&gt; &lt;SPAN class=""&gt;'cpu'&lt;/SPAN&gt;) &lt;SPAN class=""&gt;# Load the YOLOv8 model&lt;/SPAN&gt; model = YOLO(&lt;SPAN class=""&gt;'yolov8.yaml'&lt;/SPAN&gt;).to(device) &lt;SPAN class=""&gt;# Train the model&lt;/SPAN&gt; model.train(data=&lt;SPAN class=""&gt;'path/to/dataset'&lt;/SPAN&gt;, epochs=&lt;SPAN class=""&gt;50&lt;/SPAN&gt;, device=device)&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;4. Run Jupyter Notebook with Intel GPU Support&lt;/H3&gt;&lt;P&gt;When running your Jupyter Notebook, ensure that the environment variables and paths are correctly set up to utilize the Intel GPU.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Start Jupyter Notebook:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Open a terminal, activate the OneAPI environment, and start Jupyter Notebook:&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;bash&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;source&lt;/SPAN&gt; /opt/intel/oneapi/setvars.sh jupyter notebook&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Run Your Notebook:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Ensure your notebook contains the modified code to leverage Intel's GPU capabilities as described above.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Troubleshooting&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Check Compatibility:&lt;/STRONG&gt; Make sure your Intel Arc GPU is supported by the version of Intel OneAPI and Intel Extension for PyTorch you are using.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Update Drivers:&lt;/STRONG&gt; Ensure your system has the latest Intel GPU drivers installed.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Consult Documentation:&lt;/STRONG&gt; Refer to the &lt;A target="_new" rel="noreferrer"&gt;Intel OneAPI documentation&lt;/A&gt; for more detailed guidance and troubleshooting steps.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;By following these steps, you should be able to leverage your Intel Arc 770 GPU for training YOLOv8 models in a Python Jupyter notebook.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 May 2024 13:15:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1601564#M1442</guid>
      <dc:creator>Siyabonga</dc:creator>
      <dc:date>2024-05-28T13:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to train yolov8 using intel arc 770 gpu?</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1601858#M1443</link>
      <description>&lt;P&gt;Hello Johnkim7,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We wanted to inform you that it's up to the developers to choose whether their application or software supports Intel ARC or not. In regards to this, we recommend that you contact the application or software developer directly for support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However,&amp;nbsp;a&amp;nbsp;member(&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/360268"&gt;@Siyabonga&lt;/a&gt;)&amp;nbsp;of&amp;nbsp;our&amp;nbsp;community&amp;nbsp;has&amp;nbsp;addressed&amp;nbsp;your&amp;nbsp;issue;&amp;nbsp;kindly&amp;nbsp;review&amp;nbsp;it&amp;nbsp;and&amp;nbsp;follow&amp;nbsp;the&amp;nbsp;steps&amp;nbsp;suggested&amp;nbsp;to&amp;nbsp;see&amp;nbsp;if&amp;nbsp;they&amp;nbsp;fix&amp;nbsp;the&amp;nbsp;problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, for additional information, please submit a new question, as this thread will no longer be monitored.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Carmona A.&lt;/P&gt;
&lt;P&gt;Intel Customer Support Technician&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 07:25:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1601858#M1443</guid>
      <dc:creator>ACarmona_Intel</dc:creator>
      <dc:date>2024-05-29T07:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to train yolov8 using intel arc 770 gpu?</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1605507#M1456</link>
      <description>&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Hello Siyabonga,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Thanks to your guidance, I achieved a great result.&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Here is the screen capture of what I did. Hurray!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnkim7_0-1718068780452.png" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/55745iBDF89B919AF27A01/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="johnkim7_0-1718068780452.png" alt="johnkim7_0-1718068780452.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 01:20:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/How-to-train-yolov8-using-intel-arc-770-gpu/m-p/1605507#M1456</guid>
      <dc:creator>johnkim7</dc:creator>
      <dc:date>2024-06-11T01:20:13Z</dc:date>
    </item>
  </channel>
</rss>

