-
Notifications
You must be signed in to change notification settings - Fork 56
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
Update README and model.py for Nvidia GPU support #530
Conversation
Reviewer's Guide by SourceryThis pull request adds support for Nvidia GPUs by updating the model.py file to handle CUDA_VISIBLE_DEVICES and updating the README.md file to reflect the new support. Sequence diagram for GPU type detection and image selectionsequenceDiagram
participant Client
participant Model
participant GPUDetector
Client->>Model: _image(args)
Model->>GPUDetector: get_gpu()
GPUDetector-->>Model: Return gpu_type
Note over Model: Check GPU type
alt gpu_type is HIP_VISIBLE_DEVICES
Model-->>Client: Return rocm image
else gpu_type is CUDA_VISIBLE_DEVICES
Model-->>Client: Return cuda image
else gpu_type is ASAHI_VISIBLE_DEVICES
Model-->>Client: Return asahi image
else no specific GPU type
Model-->>Client: Return default image
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Once we merge: and we rebuild all the containers, this can go in. |
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 @ericcurtin - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please use
elif
instead ofelse if
in model.py - this is the correct Python syntax
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.
README.md: Updated the Nvidia GPU (cuda) status to :white_check_mark: indicating support. model.py: Added logic to handle CUDA_VISIBLE_DEVICES, returning the corresponding quay.io/ramalama/cuda:latest image. Signed-off-by: Eric Curtin <[email protected]>
3dcd1d5
to
337942c
Compare
LGTM |
README.md: Updated the Nvidia GPU (cuda) status to ✅ indicating support. model.py: Added logic to handle CUDA_VISIBLE_DEVICES, returning the corresponding quay.io/ramalama/cuda:latest image.
Summary by Sourcery
New Features: