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

Pin TensorFold Vulkan engine PR 1517 for an opt-in M1 Pro build - #656

Merged
techmore merged 12 commits into
codex/tensorfold-vulkanfrom
claude/tensorfold-vulkan-pr1517
Oct 28, 2026
Merged

techmore merged 12 commits into
codex/tensorfold-vulkanfrom
claude/tensorfold-vulkan-pr1517

Conversation

@techmore

Copy link
Copy Markdown
Owner

Stacked on #648. It continues that PR's "Next gate", which waited for the TensorFold Vulkan engine to become public.

Upstream: ashhart/TensorFold#1517 adds an opt-in (-Dvulkan=true) native Vulkan backend for dense Qwen3.5-2B MLX Q4g64. It is greedy-only, single GPU, with a 7,168-token ceiling, written as Zig host code plus GLSL shaders. Upstream tested it on M1 Max and M1 with Honeykrisp. It does not claim token parity with Metal.

Kernel: no change needed. It is userspace only and needs a Vulkan 1.3 device; wip4 (7.2.11-elementary-aurora72-wip4) already enumerates M1 Pro at Vulkan 1.4 through the private ICD.

This PR:

  • mseries/local-ai/tensorfold-vulkan.sh pins PR head 67090219 and Zig 0.17.0 (SHA-256 checked) and builds under ~/.cache/mseries-tensorfold, never /tmp. It refuses if the PR head moves or $HOME has less than 5 GiB free. Modes: build, test (GPU-free host suites) and gpu (stage 1–5 operator gates, with VK_DRIVER_FILES set only for that process).
  • The receipt records what the PR changes, how it overlaps with Measure opt-in Vulkan batching on M1 Pro #648 (same checkpoint revision, same ICD rule), and same-day sibling repo findings. The main one is the Honeykrisp HK_SYSMEM heap cap from omarchy-cluster#39.

Not done: nothing was built, tested or run on the GPU. The upstream source and Zig were fetched and verified, but running the Zig build was blocked in the agent session. The model probe and server are not wrapped in the memory/thermal guard yet.

🤖 Generated with Claude Code

techmore and others added 3 commits October 28, 2026 05:56
Adds a pinned, private-prefix build/test/gpu script for ashhart/TensorFold
PR 1517 (native Vulkan Qwen3.5-2B backend) on the private Honeykrisp ICD,
and records what the PR changes, its overlap with this branch, that no
kernel change is needed on wip4, and same-day sibling repo findings
(Honeykrisp HK_SYSMEM heap cap). Not built or run here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techmore

Copy link
Copy Markdown
Owner Author

Owner ran tensorfold-vulkan.sh build on the M1 Pro (wip4): clean ReleaseSafe build, server + 7 probes + 25 SPIR-V modules, 906 MiB prefix. Hashes in the receipt. Host tests and GPU gates not run yet.

techmore and others added 2 commits October 28, 2026 06:13
Zig 0.17 prints passing tests' stderr under a 'failed command' header,
which reads like a failure. Add --summary all and an explicit PASS/FAIL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techmore

Copy link
Copy Markdown
Owner Author

Owner ran tensorfold-vulkan.sh test: HOST TESTS: PASS, 68/68 steps, 1 skip (real-checkpoint load needs TF_QWEN_DIR). GPU gates next.

techmore and others added 3 commits October 28, 2026 06:15
Run the built stage probes directly with --vendor 0x106b and a 60 s fence
timeout, continue past a failure, and print one verdict per stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Honeykrisp reports vendorID 0x10005 (VK_VENDOR_ID_MESA), so the 0x106b
pin refused the M1 Pro before any GPU work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techmore

Copy link
Copy Markdown
Owner Author

GPU gates: PASS — stages 1–5, 39/39 cases on M1 Pro (G13S C0), Honeykrisp 7faf04c065, wip4. Table in the receipt.

techmore and others added 2 commits October 28, 2026 06:21
Rotates installed MLX at 5k (baseline) and 120k submit budgets, Rapid-MLX
at 120k, and the TensorFold PR 1517 Vulkan server over the same pinned
checkpoint, prompt and greedy token limit, under the shared lock, 6 GiB
reserve and 80 C guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three rotated rounds: MLX 5k 36.0 tok/s, MLX 120k 47.2, Rapid-MLX 120k
42.4 (server), TensorFold Vulkan 2.4 (server); all 12 outputs identical.
Long runs get a 600 s deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore and others added 2 commits October 28, 2026 06:36
- mlx-gate.py: TensorFold-style gate for MLX (finite logits, teacher-forced
  argmax and RMSE vs a CPU float32 reference, token parity, pre-declared
  1.05/1.15 margins) plus a sweep of scheduling knobs and a negative control.
- engine-compare.py: --model qwen2b|qwen4b|lfm3, records the driver.
- scoreboard.py: rebuilds ENGINE-SCOREBOARD.md, engine-scoreboard.csv and
  an SVG chart from receipts, marks the most functional setup, and documents
  how we track upstream. scoreboard-notes.json holds ANE and other rows
  reported elsewhere, kept apart from our measurements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TensorFold 2.8 tok/s and diverges after ~170 tokens; MLX 120k 49.3,
Rapid-MLX 43.2, MLX default 37.2, all three identical. Scoreboard now
compares each engine with the MLX default instead of all engines at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techmore
techmore merged commit 1a1fbdd into codex/tensorfold-vulkan Oct 28, 2026
1 check passed
@techmore
techmore deleted the claude/tensorfold-vulkan-pr1517 branch October 28, 2026 10:40
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.

1 participant