fix: add Apple M5 family and graceful fallback for unknown Apple silicon#449
Open
sam-shridhar1950f wants to merge 1 commit into
Open
Conversation
AppleSiliconHardwareInfo.detect() raised RuntimeError on any Apple chip
missing from _APPLE_PEAK_FP16, so `parallax join` crashed on M5 machines:
RuntimeError: Unknown Apple silicon chip 'M5 Max' detected.
Two changes:
1. Add M5 / M5 Pro / M5 Max entries. Values are GPU-ALU-only FP16,
consistent with the M1-M4 rows: max-bin GPU cores (10/20/40) times the
M5's measured per-core ALU rate (0.808 TFLOPS/core, derived from the
base M5's ~8.08 TFLOPS theoretical FP16 ALU ceiling). This is flat-to-
slightly-below M4 because M5's gains live in its new per-core Neural
Accelerators, not the ALUs.
2. Stop hard-crashing on unknown chips. detect() now estimates FP16 from
GPU core count (via system_profiler) at the latest known per-core rate,
or a base-chip default if the core count can't be read, and logs a
warning. This mirrors the NVIDIA path, which already falls back
conservatively for unrecognized GPUs, so a future M-series generation
degrades gracefully instead of taking down `parallax join`.
Adds tests/test_server_info.py covering the table entries and both
fallback branches (regression for the crash).
Closes GradientHQ#439
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Closes #439
What
AppleSiliconHardwareInfo.detect()raisedRuntimeErroron any Apple chip missing from_APPLE_PEAK_FP16, soparallax joincrashed on M5 machines:This PR does two things:
1. Add M5 / M5 Pro / M5 Max to the table
Values are GPU-ALU-only FP16, consistent with the existing M1-M4 rows (which are
GPU_cores × per_core_rate. e.g. M4 = 0.852/core across all variants):Derivation: max-bin GPU core counts (confirmed via Apple newsroom / Wikipedia) × the M5's measured per-core ALU rate of 0.808 TFLOPS/core, derived from the base M5's ~8.08 TFLOPS theoretical FP16 ALU ceiling (roofline analysis: 1578 MHz, 128 ALUs/core, double-rate FP16). This is flat-to-slightly-below M4 (0.852/core) because M5's gains live in its new per-core Neural Accelerators, not the ALUs.
2. Stop hard-crashing on unknown chips
detect()now estimates FP16 from GPU core count (viasystem_profiler) at the latest known per-core rate, or a base-chip default if the core count can't be read, and logs a warning instead of raising. This mirrors the NVIDIA path, which already falls back conservatively for unrecognized GPUs (_match_gpu_specs). The Apple path was the lone hard-crasher, so the next unreleased generation degrades gracefully rather than taking downparallax join.Tests
tests/test_server_info.pycovers the table entries and both fallback branches (regression for #439):All pass locally (mocked
subprocess/psutil; no hardware dependency).black,isort, andruffclean.