-
Notifications
You must be signed in to change notification settings - Fork 117
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
Fix ramalama info to display NVIDIA and amd GPU information #848
Conversation
Reviewer's Guide by SourceryThis pull request enhances GPU detection by adding support for NVIDIA GPUs and modifying the AMD GPU detection logic. The NVIDIA GPU detection uses Sequence diagram for NVIDIA GPU detectionsequenceDiagram
participant P as Python Script
participant NS as nvidia-smi
P->>NS: Execute nvidia-smi to query GPU index and memory
NS-->>P: Returns index and memory information
P->>NS: Execute nvidia-smi -L to query GPU names
NS-->>P: Returns GPU names
P->>P: Parse output
P->>P: Update best GPU
Updated class diagram for GPU detectionclassDiagram
class GPUDetector {
+get_nvidia_gpu()
+get_amd_gpu()
-_read_gpu_memory(path_pattern, gpu_name, env_var)
-_update_best_gpu(memory_mib, gpu_name, env_var)
}
note for GPUDetector "Modified get_nvidia_gpu to retrieve GPU names and return a list of GPU info dictionaries."
note for GPUDetector "Modified get_amd_gpu to return the result of _read_gpu_memory."
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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 @rhatdan - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider returning a consistent data structure from
get_nvidia_gpu
even when no GPUs are found. - It looks like
get_amd_gpu
is only partially implemented - is it ready to be merged?
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.
529a751
to
800aba7
Compare
Fixes: containers#822 Signed-off-by: Daniel J Walsh <[email protected]>
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.
LGTM 👍
Fixes: #822
Summary by Sourcery
This pull request enhances GPU detection to provide more detailed information about NVIDIA GPUs and fixes an issue where AMD GPU detection was not returning any value. The NVIDIA GPU detection now retrieves and displays the GPU name, VRAM, and associated environment variable.
New Features:
Bug Fixes:
Enhancements: