Skip to content

fix(kernel): enable disk row stores on windows - #659

Open
wenlive wants to merge 1 commit into
FlashML-org:mainfrom
wenlive:fix/windows-disk-row-store
Open

wenlive wants to merge 1 commit into
FlashML-org:mainfrom
wenlive:fix/windows-disk-row-store

Conversation

@wenlive

@wenlive wenlive commented Oct 11, 2026

Copy link
Copy Markdown

Related to #384; complements #575.

Windows source builds omit _row_store, and the implementation depends on POSIX file I/O. This prevents using disk-backed PLE tables on Windows.

Implement the existing platform seams with Unicode file handles, overlapped positioned reads, aligned allocation and CUDA driver symbol loading. This lets fixed-width table rows remain on disk and enter the existing bounded staging buffers. The PLE hash and Linux reader algorithms retain their current behavior.

Extend the row-store tests with Unicode paths, offsets above 4 GiB, and recovery after a short read. Give the graph test's second store its own checkpoint file so a Windows writer does not overwrite a still-open file.

Validation: Windows 11 build 26200, RTX 5090 D v2 24 GB (driver 610.88), Ryzen 9 9900X, 64 GB RAM, MSVC 19.44, CUDA 13.0, Python 3.12.13, Torch 2.11.0+cu130. Base: 74a387777708b9650a027494bcb37d2ab9cf2443.

python build_row_store_validation.py --root . --with-pinned
$env:PYTHONPATH = 'python'
python -m pytest tests/kernels/test_row_store.py tests/models/qwen4_exp/test_ple_disk.py -q

11 passed, including GPU-oracle and CUDA-graph checks. Independently rebuilt against latest-main's Torch 2.14.1 CPU dependency: 8 passed, 3 GPU tests skipped (commands in the linked validation records). The baseline row-store source fails to compile on dlfcn.h with both versions.

The harness (source and test logs) selects the declared row-store extension and builds the pinned-memory prerequisite with Windows compiler/library settings. Synthetic byte tables and toy PLE checkpoints were used. Full-model serving, Linux hardware and Torch 2.14 CUDA were not validated; the 2.11 CUDA run does not verify main's complete dependency contract.

Prepared with AI assistance. The contributor has reviewed and understands the change; the reported tests were executed through development tooling.

KarrAcaRn pushed a commit to KarrAcaRn/FreeToken-ByAI that referenced this pull request Oct 11, 2026
…s on windows

setup.py conflict with FlashML-org#575's Windows build: the row store takes next's
shared extra_compile (/O2 on Windows, BuildExtension adds the /std flag;
-O3 + the CUDA or ROCm C++ standard elsewhere) instead of the PR's own
per-platform flags.

This branch has not been deployed

No deployments
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.

1 participant