Repository navigation
cli: tensorfold device says what this machine runs, saved in ~/.tensorfold/device.json - #3107
Merged
Merged
Conversation
3 of 4 tasks
ashhart
force-pushed
the
lead/device-profile
branch
3 times, most recently
from
November 17, 2026 23:11
b2537ab to
cd5df82
Compare
# Conflicts: # CHANGELOG.md
…rfold/device.json
Move CUDA family-info helpers and their existing tests to a focused module without changing their bodies. Keep the device command entry under Unreleased and preserve the current serve config parsing.
ashhart
force-pushed
the
lead/device-profile
branch
from
November 18, 2026 03:47
cd5df82 to
6fa0f24
Compare
This was referenced Nov 18, 2026
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.
People often can't tell whether TensorFold will run on their machine before they try a model. This adds a device check.
tensorfold device [--json] [--rescan]scans the machine (OS, CPU, RAM, each GPU's memory and compute capability, or the Apple chip) and joins it with what this binary was built for: which backend runs here, or why none does; which checkpoint formats this device serves; how much memory model weights may take; and which models in the Hugging Face cache fit.tensorfold,tensorfold helpand--helpstart with a two-line summary, for exampleThis machine: Apple M3 Ultra, 256 GiB unified memory, macOS 27.2.1. Supported: Metal.These read only cheap OS sources (sysctl,/proc,/sys, DXGI or the registry); no GPU driver is opened. Onlytensorfold deviceasks the CUDA driver, and it makes no context.~/.tensorfold/device.json(%USERPROFILE%on Windows) with a schema number, scan time, binary version and a hardware fingerprint. It holds no serial number, host name, user name or path. It is scanned again only when the hardware or the binary changes, or with--rescan.servereads a current profile and stops before loading only for what the machine certainly can't run: a driver-reported compute capability this build's recorded kernels don't cover, an Intel Mac, or a family the device can't run (Llama before the M5, MiniMax-M3.1-Flash off a GB10). With no profile, a stale one, or a GPU known only by its name, serve behaves exactly as before.TENSORFOLD_DEVICE_CHECK=0skips the check.Docs: docs/device.md, and one line in the README's quick start.
Tests:
zig build test-device(27 tests; also inzig build test) covers recorded and built-to-format readings (macOS M3 Ultra and M5 Ultra, GB10 Linux, Intel Mac, RTX 3090, H100, WSL, Strix Halo, Windows adapters), the support table, the profile round trip and rescan rules, the summary text, and that the assumed SM list matches the release build's. Cross-compiles oftensorfold-nativefor x86_64-linux-gnu, aarch64-linux-gnu and x86_64-windows-gnu pass.zig fmtand the lean check are clean.Device runs (fresh profile each, at this branch):
tensorfoldgivesThis machine: NVIDIA GB10 (DGX Spark class), sm_121, 122 GiB unified memory, Ubuntu 24.04.5 LTS. Supported: CUDA (likely).tensorfold deviceconfirms it from the driver (GPU 0 sm_121, unified memory), reports 109.5 GiB for weights, and saves a full scan; the next bare run drops "(likely)". The saved profile holds no host or user name.This machine: Apple M5 Ultra, 256 GiB unified memory, macOS 27.0.1. Supported: Metal., 177.2 GiB for weights, no Llama or Gemma 4 caveat (both run here). The saved profile holds no host or user name.