Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Update to macOS SDK 26 and Metal 4#290

Merged
danieldk merged 4 commits intomainfrom
metal4
Nov 7, 2025
Merged

Update to macOS SDK 26 and Metal 4#290
danieldk merged 4 commits intomainfrom
metal4

Conversation

@danieldk
Copy link
Member

@danieldk danieldk commented Nov 5, 2025

  • Switch to macOS 26 as the minimum requirement and support Metal 4.
  • The hf-nix bump also requires some CUDA fixes, primarily nvcc now wraps gcc correctly in nixpkgs, so we have to pass gcc with our glibc backwards compatibility.

@danieldk danieldk marked this pull request as ready for review November 7, 2025 09:58
];
sourceBuild = true;
}
#{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabled, because we are now CUDA 12.6+.

Copy link
Contributor

@MekkCyber MekkCyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Comment on lines +140 to +149
#{
# torchVersion = "2.8";
# cudaVersion = "12.4";
# cxx11Abi = true;
# systems = [
# "x86_64-linux"
# "aarch64-linux"
# ];
# sourceBuild = true;
#}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this expected ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, see my comment above. We now only have CUDA 12.6 and up. Which means we finally have to make FA3 work with a newer CUDA version.

Comment on lines +108 to +113
lib.optionalString metalSupport ''
METAL_PATH=$(${xcrunHost}/bin/xcrunHost xcodebuild -showComponent MetalToolchain 2> /dev/null | sed -rn "s/Toolchain Search Path: (.*)/\1/p")
if [ ! -d "$METAL_PATH" ]; then
>&2 echo "Cannot find Metal toolchain, use: xcodebuild -downloadComponent MetalToolchain"
exit 1
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the user building the kernel don't have MetalToolchain installed would it be better to use downloadComponent and get the toolchain and the path or just raise an error ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not very keen on modifying the user's development environment outside the sandbox. Also, it will only result in half an install, because the toolchain mapping for the user is not set up (since the build runs as a non-privileged user).

Co-authored-by: Mohamed Mekkouri <93391238+MekkCyber@users.noreply.github.com>
@danieldk danieldk merged commit 22c1a7c into main Nov 7, 2025
28 checks passed
@drbh drbh mentioned this pull request Nov 10, 2025
@julien-blanchon
Copy link

Some kernel are failing on Metal 3 when compile with Metal 4 (which is now the default for kernel-builder)

RuntimeError: Failed to create Metal library: This library is using language version 4.0 which is not supported on this OS.

Any idea how to solve ?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants