Skip to content

fix(gpu): do not assume gpu being returned has node and mem #5310

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

Merged
merged 1 commit into from
May 3, 2025

Conversation

mudler
Copy link
Owner

@mudler mudler commented May 3, 2025

Description

This pull request includes changes to improve error handling and ensure robustness in VRAM estimation logic. The updates focus on adding checks for nil values and refining conditions to handle edge cases.

Improvements to error handling and robustness:

  • core/config/gguf.go: Updated the guessGGUFFromFile function to only estimate VRAM usage if the available VRAM is greater than zero, preventing unnecessary operations when VRAM is unavailable.

  • pkg/xsysinfo/gpu.go: Enhanced the TotalAvailableVRAM function by adding checks to ensure that gpu, gpu.Node, and gpu.Node.Memory are not nil before accessing their properties, improving stability when processing GPU information.

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Copy link

netlify bot commented May 3, 2025

Deploy Preview for localai ready!

Name Link
🔨 Latest commit a1f1d84
🔍 Latest deploy log https://app.netlify.com/sites/localai/deploys/68164b77c9ca820009d6becc
😎 Deploy Preview https://deploy-preview-5310--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mudler mudler merged commit 72111c5 into master May 3, 2025
20 of 24 checks passed
@mudler mudler deleted the fix/nogpu branch May 3, 2025 17:00
@mudler mudler added the bug Something isn't working label May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant