Repository navigation
mlx: select an Apple chip by its whole name and test the Darwin branches - #323
Open
cacheline999 wants to merge 1 commit into
Open
cacheline999 wants to merge 1 commit into
cacheline999 wants to merge 1 commit into
Conversation
`--device-model` matched any substring of the sysctl brand string, so "M1", "pro" or "Apple M" verified the selection of an "Apple M1 Pro". Compare the whitespace-normalized, case-folded request with the whole chip name, with or without the "Apple" prefix. Cover the Darwin branches of inspect_devices with explicitly mocked cases (available, model match, partial/other model mismatch, non-ARM64 chip, failed sysctl) and add a doctor test that runs only on a real Apple Silicon host. Agent-assisted-by: Claude Code / claude-opus-5-5 (author) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: hid19960830 <lingzhichu.clz@gmail.com>
Dong1017
reviewed
Nov 2, 2026
Dong1017
left a comment
Collaborator
There was a problem hiding this comment.
The whole-name MLX selection fix looks correct at 4980bf1c; hosted Ready validation is still pending.
- The two-file change rejects partial names such as
M1,proandApple MforApple M1 Pro, while preserving case/whitespace normalization and the optional Apple prefix. The discovery result contract and other backends are unchanged. - The applicable Ready run is
action_requiredwith zero jobs. Passing declaration checks do not replace its tests/package checks; the next step is the existing maintainer's decision on that run. - The existing author, cacheline999, retains the correction. The M1 Pro receipt is author-reported; Intel Mac behavior and the parent Issue's acceptance remain separate. Mocked Darwin tests establish software-branch coverage, not hardware compatibility.
Evidence and review scope
- Head:
4980bf1c80e5d4ec134c72ea060499f062bc93e9; API base / observed main:2baebf6ebb815ebf07d21c41e3b3754858c0798e. - Independently read both changed files and followed
inspect_devicethrough the MLX adapter and environment-inspection caller. The matching predicate now compares normalized whole names rather than substrings. - Issue evidence distinguishes the author's historical
28d677cadiscovery result from this fix. The PR reports targeted tests and Ruff on M1 Pro; I did not reproduce those runs. - Static review only: no local suite, Apple host, model/device execution or workflow action by this maintenance session. No source defect found in this bounded delta. This COMMENT does not imply APPROVE/LGTM, parent-Issue acceptance or MLX/Metal performance validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Governing Issue and delivery slice
Refs #38
--device-modelmatch". Not yet assigned; real-host evidence and this scope are posted on task: add MLX backend discovery and seed source-grounded MLX knowledge for Apple Silicon #38 (task: add MLX backend discovery and seed source-grounded MLX knowledge for Apple Silicon #38 (comment)) for the acceptance owner.--device-modelmatching for the MLX probe, mocked tests for the Darwin branches ofinspect_devices, and a doctor test that runs only on a real Apple Silicon host.Knowledge authorship declaration
Not applicable: no path protected by
docs/knowledge-model-policy.mdis changed.Changed artifacts and evidence
--device-modelmatch that verifies the right chipsrc/inferrsi/infra/platforms/mlx.py: compare the whitespace-normalized, case-folded request with the whole chip name, with or without theAppleprefix--device-model M1,proandApple Mall returnedavailable/selection_verified: true. After: those three exit 1 withdevice_model_mismatch;m1 prostill exits 0 withavailabletests/test_mlx_discovery.py: mocked Darwin cases (available, model match, partial/other model mismatch, non-ARM64 chip, failed sysctl), labeled as claiming no hardware validationM1,pro,Apple Mfail onmainand pass with this changetest_actual_apple_silicon_doctor_reports_available, skipped unless Darwin/arm64Checks and dependencies
pytest tests/test_mlx_discovery.py tests/test_inspection.py→ 34 passed, 1 skipped (Python 3.11.14, Apple M1 Pro, macOS 26.1);ruff check src tests tools→ passed;git diff --check→ clean.test_actual_non_macos_doctor_reports_unavailableskips on macOS by design; full suite not run locally.inspect_devicessignature and result keys are unchanged.Remaining work and Issue closure
platform_packscriterion of task: add MLX backend discovery and seed source-grounded MLX knowledge for Apple Silicon #38 is obsolete after refactor: remove the unread platform_packs descriptors and fix the generated-path guidance #201.🤖 Generated with Claude Code