Skip to content

Conversation

dk-blackfuel
Copy link

@dk-blackfuel dk-blackfuel commented Sep 25, 2025

Description

This PR addresses Issue with parsing the lspci output to detect AMD Mi3xx GPUs and make them available for use in cloudstack.

Fixes: #11701

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

On an Mi325X server, the bash script was launched and the output matches the expected output described in the issue.

Also, in cloudstack 4.21, with the modified script version, the GPUs are listed as expected :
Screenshot 2025-09-23 at 19 21 17

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the detection of AMD Mi3xx GPUs by updating the PCI class filtering logic in the GPU discovery script. The issue was that Mi3xx GPUs have a PCI class of "Processing accelerators" rather than "3D controller", causing them to be filtered out during GPU detection.

  • Updates the PCI class regex pattern to include "Processing accelerators" alongside "3D controller"
  • Adds comprehensive documentation example showing expected output for Mi325X GPU

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I tested the script locally with my Nvidia GPU and the script is not throwing any errors.

Copy link

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.42%. Comparing base (4884f52) to head (b5a54a4).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11715      +/-   ##
============================================
+ Coverage     17.39%   17.42%   +0.03%     
- Complexity    15284    15335      +51     
============================================
  Files          5891     5892       +1     
  Lines        526290   526521     +231     
  Branches      64257    64293      +36     
============================================
+ Hits          91543    91762     +219     
- Misses       424401   424407       +6     
- Partials      10346    10352       +6     
Flag Coverage Δ
uitests 3.61% <ø> (-0.01%) ⬇️
unittests 18.47% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vishesh92
Copy link
Member

@dk-blackfuel Are you able to use it inside a VM? This might require changes in LibvirtGPUDef.java.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GPU Discovery not detecting AMD Mi3xx GPUs
3 participants