Skip to content

Make device_count() return 0 when there is no GPU#3486

Open
zcbenz wants to merge 1 commit intoml-explore:mainfrom
zcbenz:metal-device-count
Open

Make device_count() return 0 when there is no GPU#3486
zcbenz wants to merge 1 commit intoml-explore:mainfrom
zcbenz:metal-device-count

Conversation

@zcbenz
Copy link
Copy Markdown
Collaborator

@zcbenz zcbenz commented May 6, 2026

Close #3148: crash on import was gone after the thread safety changes, the mysterious NSRangeException error message was improved by #3428, and this PR solves the last piece by making it possible to detect if there is GPU access at run time.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Headless/no-GPU environments crash on MLX import (NSRangeException) instead of failing gracefully

1 participant