Skip to content

v0.1.2

Choose a tag to compare

@ehsanmok ehsanmok released this 19 Apr 05:16

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_kernel with comptime for.
  • Annotate every GPU kernel with MAX_THREADS_PER_BLOCK_METADATA so NVPTX can right-size the register budget.

Tooling / UX

  • Replace the DEBUG_TIMING comptime flag with a runtime --debug-timing argv flag on the GPU benchmark binary; enable with pixi run -e dev bench-gpu -- --debug-timing <file>.
  • Unify the GPU benchmark into a single std.benchmark.Bench report with four rows (from host bytes, pinned wall-clock, pinned device-only, loads[target='gpu']). The device-only row uses iter_custom + DeviceContext.execution_time for CUDA-event timing.
  • Gate parse_json_gpu / parse_json_gpu_from_pinned on has_accelerator() with a friendly error when no GPU is detected.

Build / platform

  • Pin sysroot_linux-64 = "2.34.*" so mojo build can 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.dev2026041805 in both pixi.toml and recipe.yaml for reproducible installs.

Dev env hygiene

  • Make the default pixi env lean. mojodoc, pre-commit, gdown, git (and the mojo build-dependent build-bench-* / bench-* tasks) now live in the dev feature. End users (and the CI test matrix) no longer pull hundreds of MB of dev tooling. Run dev tasks with pixi run -e dev <task> or pixi shell -e dev.

Bug fixes

  • Fix String indexing in tests/test_bracket_match.mojo after String.__getitem__ dropped the implicit codepoint accessor.

Docs

  • Repair stale src/ -> json/ paths in docs/architecture.md, refresh the GPU benchmark metric tables in docs/performance.md and benchmark/README.md, and document the new --debug-timing flag and -e dev workflow.

Install

```toml
[dependencies]
json = { git = "https://github.com/ehsanmok/json.git", tag = "v0.1.2" }
```

Full changelog

v0.1.1...v0.1.2