v0.1.2
Patch release that restores GPU parse throughput to its earlier published level, adds a leaner default pixi env, and bumps the Mojo compiler pin for reproducible installs.
Why this release exists
Between the initial GPU work (multi-GB/s on twitter_large_record.json) and v0.1.1, a regression crept into the pinned stream-compaction path that dropped parse_json_gpu_from_pinned to ~0.56 GB/s on the same hardware. v0.1.2 restores the expected throughput by parallelising the two prefix sums that had regressed to single-thread scans, and locks in the result with a stable Mojo pin.
GPU perf (NVIDIA B200, twitter_large_record.json, 803 MB)
| row | v0.1.1 (regressed) | v0.1.2 (restored) |
|---|---|---|
parse_json_gpu_from_pinned (pinned, wall-clock) |
0.56 GB/s | ~6 GB/s median, 7.3 GB/s best |
parse_json_gpu_from_pinned (device-only, via iter_custom) |
— | ~6.6 GB/s median, 7.2 GB/s best |
match_brackets_gpu (1 M elements) |
55 ms | 11.6 ms |
These numbers are where the GPU path sat before the regression; v0.1.2 is "back on budget", not a new speedup.
Changes
Perf (regression fixes)
- Restore parallel GPU stream-compaction prefix sum using
block.prefix_sum(the scan had been running single-threaded). - Restore parallel GPU bracket-match depth prefix sum (
match_brackets_gpu) the same way. - Unroll the 32-byte scan in
_quote_popcount_kernelwithcomptime for. - Annotate every GPU kernel with
MAX_THREADS_PER_BLOCK_METADATAso NVPTX can right-size the register budget.
Tooling / UX
- Replace the
DEBUG_TIMINGcomptime flag with a runtime--debug-timingargv flag on the GPU benchmark binary; enable withpixi run -e dev bench-gpu -- --debug-timing <file>. - Unify the GPU benchmark into a single
std.benchmark.Benchreport with four rows (from host bytes,pinned wall-clock,pinned device-only,loads[target='gpu']). Thedevice-onlyrow usesiter_custom+DeviceContext.execution_timefor CUDA-event timing. - Gate
parse_json_gpu/parse_json_gpu_from_pinnedonhas_accelerator()with a friendly error when no GPU is detected.
Build / platform
- Pin
sysroot_linux-64 = "2.34.*"somojo buildcan resolve the glibc 2.34 symbols referenced by Mojo's shared libs, while staying below the sysroot 2.39 that destabilises Mojo's JIT on GitHub's ubuntu-latest image. - Pin mojo / mojo-compiler to
==0.26.3.0.dev2026041805in bothpixi.tomlandrecipe.yamlfor reproducible installs.
Dev env hygiene
- Make the default pixi env lean.
mojodoc,pre-commit,gdown,git(and themojo build-dependentbuild-bench-*/bench-*tasks) now live in thedevfeature. End users (and the CI test matrix) no longer pull hundreds of MB of dev tooling. Run dev tasks withpixi run -e dev <task>orpixi shell -e dev.
Bug fixes
- Fix
Stringindexing intests/test_bracket_match.mojoafterString.__getitem__dropped the implicit codepoint accessor.
Docs
- Repair stale
src/->json/paths indocs/architecture.md, refresh the GPU benchmark metric tables indocs/performance.mdandbenchmark/README.md, and document the new--debug-timingflag and-e devworkflow.
Install
```toml
[dependencies]
json = { git = "https://github.com/ehsanmok/json.git", tag = "v0.1.2" }
```