-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect Intel ARC GPU in Meteor Lake chipset #749
Conversation
Signed-off-by: Charro Gruver <[email protected]>
Reviewer's Guide by SourceryThis pull request adds preliminary support for Intel ARC GPUs on Meteor Lake chipsets. It implements GPU detection logic by scanning PCI device files for a specific Intel ARC identifier and sets the 'INTEL_VISIBLE_DEVICES' environment variable. Additionally, updates to configuration and image mapping in the model allow the system to properly utilize Intel GPUs. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
WDYT? This is an attempt at Intel GPU detection. It's very narrow at this point, but we can iterate on it to make it capable of broader detection. |
ramalama/common.py
Outdated
# INTEL iGPU CASE (Look for ARC GPU) | ||
if os.path.exists('/sys/bus/pci/drivers/i915/0000:00:02.0/device'): | ||
try: | ||
with open('/sys/bus/pci/drivers/i915/0000:00:02.0/device', 'rb') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to use a glob for this?
glob.glob(/sys/bus/pci/drivers/i915/*/device)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe so +1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try that.
Learning Python on the Go as it were... ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified to use glob.
WDYT?
Signed-off-by: Charro Gruver <[email protected]>
There are other iGPU types from Intel which will work in theory. Right now the test is for a very specific chip. As we identify other iGPUs that provide a boost over CPU inference, we'll need to decide how to handle a table of supported iGPUs. |
I've got some 13th gen and 12 gen NUCs which I plan to test. They are currently part of OCP clusters in my lab, but I can tear them down this weekend. Anything older than that is probably not worth it. CPU will likely be better. |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @cgruver - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider wrapping file I/O in a try-except block to safely handle unreadable or transient files.
- Refactor the Intel detection logic into its own function to improve clarity and testability.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Done. |
Add logic to detect an Intel GPU and set
INTEL_VISIBLE_DEVICES
if found.Note: This is preliminary logic that narrowly detects the Intel ARC GPU in the Meteor Lake Core Ultra 7 chipset.
Summary by Sourcery
Detect Intel ARC GPUs and use them if available.
New Features:
Tests: