Skip to content

dasVulkan is off by default on Apple builds - #4075

Merged
borisbat merged 3 commits into
masterfrom
bbatkin/vulkan-off-on-mac
Sep 19, 2026
Merged

borisbat merged 3 commits into
masterfrom
bbatkin/vulkan-off-on-mac

Conversation

@borisbat

Copy link
Copy Markdown
Collaborator

Behavior change: an Apple build leaves dasVulkan out unless configured with -DDAS_VULKAN_DISABLED=OFF; a Mac build directory that had the module keeps it until the cached option is unset (cmake -B build -UDAS_VULKAN_DISABLED).

Why. On a Mac, Vulkan is MoltenVK, whose 32 KB workgroup memory cap declines the kernel classes the module's consumers serve, and what it proves does not carry to a native Vulkan device. Every Mac build paid the module's build time and every dasLLAMA test child its engine-module compile for two permanently red suite files.

What changes.

  • The root CMake option DAS_VULKAN_DISABLED defaults to ON on Apple and stays OFF elsewhere; the flag remains explicit for anyone who wants MoltenVK.
  • The nightly Vulkan lane's macOS job passes -DDAS_VULKAN_DISABLED=OFF, since proving the MoltenVK loader path is its purpose.
  • Preflight's compile sweep skips the four Vulkan-gated trees (examples/vulkan/, examples/vulkan_imgui_cube/, examples/gltf/mesh_viewer_vulkan/, modules/dasVulkan/) while the module's shared artifact is absent, and sweeps them as before while it exists (SWEEP_NEEDS_MODULE in utils/internal/preflight/config.das).
  • The dasVulkan README, ARCHITECTURE sec.9 and ROADMAP say macOS is an opt-in.

Observable behavior.

  • A fresh Mac configure prints no dasVulkan module and builds no Vulkan target -> the vulkan test cells skip loudly (require ?vulkan), and run.das -- --suite model-free on the M5 Max goes from two red files to none.
  • Linux and Windows builds, every per-PR CI lane, the doc lane (Ubuntu, flag explicit) -> unchanged.
  • The nightly macOS Vulkan job -> still builds and probes MoltenVK, now by explicit opt-in.

Where to look. The option block in the root CMakeLists.txt, and the build_macos job of .github/workflows/nightly_vulkan.yml.

Validation, claims, ledger

Validation

  • On the M5 Max: a reconfigure with the option unset reads DAS_VULKAN_DISABLED:BOOL=ON, the tree builds, and the two formerly red files read test_vulkan_tier 36 passed and test_vulkan_dec_tail 2 passed, 3 skipped (34/2 and 2/3 before, the MoltenVK cap declining the class rails). The full preflight ran once: the fast tier was red on the compile sweep (three Vulkan example roots with no module to require), which the sweep rule fixes; every lane the red tier skipped then ran alone and green - docs (vulkan2rst skips without the module), tests-cpp, tests-interp, tests-jit, tests-aot, utils-tests - and the sweep gate reads 726 roots compiling with the four Vulkan trees held back.
  • No per-PR CI lane runs on macOS, so CI cannot observe the flip; the nightly Vulkan macOS job is the lane that does, and it opts in explicitly.

Not done

  • A Mac box that built the module before keeps its cached OFF and its built dasModuleVulkan.shared_module until the option is unset and the artifact removed; CMake does not delete either.

borisbat and others added 2 commits September 19, 2026 01:22
On a Mac, Vulkan is MoltenVK: its 32 KB workgroup memory cap declines the
kernel classes the module's consumers serve, and what it proves does not carry
to a native Vulkan device, so every Mac build paid the module's build time and
every dasLLAMA test child its engine-module compile for two permanently red
suite files. The root option DAS_VULKAN_DISABLED now defaults to ON on Apple
and stays OFF elsewhere; -DDAS_VULKAN_DISABLED=OFF opts in, which the nightly
Vulkan lane's macOS job does explicitly since proving the MoltenVK loader path
is its purpose. The dasVulkan README, ARCHITECTURE sec.9 and ROADMAP say macOS
is an opt-in.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…sVulkan artifact

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 19, 2026 08:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The new sweep gating currently only considers .shared_module presence in DLL builds, which can still cause compile-sweep failures in static builds where dasVulkan is disabled.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity · 2 Low severity

Open (3)
What changed in this PR

This PR makes dasVulkan opt-in on Apple builds by defaulting DAS_VULKAN_DISABLED to ON under APPLE, while keeping non-Apple behavior unchanged. It also adjusts CI and preflight behavior/docs so Vulkan-dependent trees are only built/swept when the module is actually present.

Changes:

  • Default DAS_VULKAN_DISABLED to ON on Apple in the root CMakeLists.txt, preserving OFF elsewhere.
  • Update the nightly macOS Vulkan workflow job to explicitly opt in with -DDAS_VULKAN_DISABLED=OFF.
  • Teach preflight’s compile sweep to skip Vulkan-gated trees when the dasVulkan shared artifact is absent, and document the opt-in in dasVulkan docs.
File Description
CMakeLists.txt Makes dasVulkan disabled-by-default on Apple via an APPLE-conditional default.
.github/​workflows/​nightly_vulkan.yml Explicitly opts the macOS nightly Vulkan lane into building dasVulkan.
utils/​internal/​preflight/​config.das Adds SWEEP_NEEDS_MODULE and gates sweep roots on module artifact presence.
utils/​internal/​preflight/​tests/​test_changed_set.das Extends sweep-exclusion tests to cover module-gated trees.
utils/​internal/​preflight/​README.md Documents the new split between SWEEP_EXCLUDED and SWEEP_NEEDS_MODULE.
modules/​dasVulkan/​README.md Clarifies macOS usage as opt-in via -DDAS_VULKAN_DISABLED=OFF.
modules/​dasVulkan/​ARCHITECTURE.md Updates architecture docs to reflect Apple opt-in and rationale.
modules/​dasVulkan/​ROADMAP.md Updates macOS section to reflect opt-in behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread utils/internal/preflight/config.das Outdated
Comment thread utils/internal/preflight/config.das Outdated
Comment thread utils/internal/preflight/tests/test_changed_set.das
…atic build asks the binary

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 19, 2026 08:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The change cleanly implements the Apple-default disable with explicit opt-in paths and updates preflight/tests/docs to keep local and CI behavior consistent.

Review effort: Lite
Findings: None

Resolved since last review (3)

@borisbat
borisbat merged commit 3ad9062 into master Sep 19, 2026
38 checks passed
@borisbat
borisbat deleted the bbatkin/vulkan-off-on-mac branch September 19, 2026 10:58
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.

2 participants