Skip to content

Add NanoVDB TEACHME interactive tutorial + docs-compile test harness - #2226

Open
harrism wants to merge 4 commits into
AcademySoftwareFoundation:masterfrom
harrism:nanovdb-teachme
Open

Add NanoVDB TEACHME interactive tutorial + docs-compile test harness#2226
harrism wants to merge 4 commits into
AcademySoftwareFoundation:masterfrom
harrism:nanovdb-teachme

Conversation

@harrism

@harrism harrism commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Adds doc/nanovdb/TEACHME/ — an interactive, LLM-guided tutorial for the
NanoVDB user API, plus a test harness that keeps it from drifting from the
real headers.

  • User lesson (nanovdb_user_lesson.md) — 10 modules: sparse-grid
    foundations, GridHandle/IO, ReadAccessor, NodeManager, math + sampling +
    HDDA, GPU kernels, GPU grid builders (PointsToGrid/MeshToGrid), topology
    operators + data re-homing (Injection), IndexGrid/VoxelBlockManager,
    and OpenVDB ↔ NanoVDB conversion.
  • Cheat sheet (nanovdb_user_cheatsheet.md) — one-page API reference.
  • Capstone (capstone/) — a GPU level-set ray-march renderer (scaffold +
    reference + CMake), rendering an SDF sphere on the device.

Why a test harness

Markdown code in docs is never compiled, so it silently rots as the API
changes. test/ extracts every C++/CUDA block and compiles it (compile-only)
against the real NanoVDB headers, and validates every #include / prose header
reference. ~64 blocks compile green; run test/run.sh. This is in the same
spirit as the doc-quality CI gates being added in #2217.

A CI workflow (.github/workflows/teachme.yml) runs the harness whenever the
NanoVDB headers (nanovdb/nanovdb/**) or the tutorial change, so an API change
that breaks a lesson is caught automatically. It's compile-only (~90s on a
standard runner, no GPU) and reuses the existing aswf/ci-openvdb CUDA image.

Notes

  • Docs + harness + a CI workflow that runs it — no changes to NanoVDB headers.
  • The harness is compile-only by design (catches API drift); the capstone is
    the runnable end-to-end check.
  • Authored interactively with Claude (see commit co-author trailer).

@harrism
harrism requested a review from kmuseth as a code owner June 3, 2026 06:48
@harrism
harrism force-pushed the nanovdb-teachme branch from 9fb57ad to a0abc50 Compare June 3, 2026 07:43
@harrism
harrism marked this pull request as draft June 3, 2026 07:43
@harrism
harrism force-pushed the nanovdb-teachme branch 6 times, most recently from be3d2b9 to c4c5e8e Compare June 4, 2026 06:03
doc/nanovdb/TEACHME/ is an interactive, LLM-guided tutorial for the
NanoVDB user API: 10 modules (reading grids, ReadAccessor, math/HDDA
sampling, GPU kernels, GPU grid builders, topology operators + data
re-homing via Injection, IndexGrid/VoxelBlockManager, OpenVDB
conversion), a cheat sheet, and a GPU level-set ray-march capstone.

To keep the tutorial from drifting from the API, the test harness in
doc/nanovdb/TEACHME/test/ extracts every C++/CUDA code block from the
docs and compiles it against the real NanoVDB headers, and validates
that every #include and prose header reference resolves. ~64 blocks
compile green.

A CI workflow (.github/workflows/teachme.yml) runs the harness whenever
the NanoVDB headers or the tutorial change, so API drift is caught
automatically. It is compile-only and needs no GPU.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>
@harrism
harrism force-pushed the nanovdb-teachme branch from c4c5e8e to 86dc181 Compare June 4, 2026 06:13
@harrism
harrism marked this pull request as ready for review June 4, 2026 08:34
@swahtz swahtz added the nanovdb label Jun 5, 2026

@kmuseth kmuseth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great - nice work! Please update pendingchanges/nanovdb.txt

A few high-level questions: it's unclear exactly what and how this documentation is intended for. More to the point, is it for novice developers or AI agents? I was expecting to see this in a top-level README, but I couldn't find it.

harrism and others added 3 commits August 4, 2026 01:27
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Mark Harris <mharris@nvidia.com>
@harrism

harrism commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks Ken — pendingchanges added in 94c0469, as a New Features bullet in pendingchanges/nanovdb.txt.

On the audience question: it's for human developers who are new to NanoVDB, not for AI agents. The LLM is the delivery mechanism, not the reader. The lesson file is written as an instructor prompt — the agent reads it and then teaches you the API interactively, module by module, quizzing as it goes and adapting to your answers. You are the student; the agent is the teacher. It is explicitly not agent-facing reference material like a CLAUDE.md or an MCP schema.

The reason for that shape is that the agent can read both the lesson and the NanoVDB headers in the same session, so it can verify API details against the real source and debug your exercises live — which a static tutorial can't do, and which is also why the tutorial can't drift silently (the harness compiles every code block against the real headers).

That framing is in doc/nanovdb/TEACHME/README.md, but you're right that it isn't discoverable — you had to find the directory first. The PR currently links it from nanovdb/nanovdb/Readme.md and doc/nanovdb/doc.md, which are the two NanoVDB doc entry points; the repo-root README.md has no per-component documentation index, so there was no obvious slot there.

Happy to fix the discoverability whichever way you prefer — tell me which you meant by "top-level README" and I'll do it:

  • lead doc/nanovdb/TEACHME/README.md with an explicit "who this is for" paragraph;
  • promote the summary into nanovdb/nanovdb/Readme.md rather than a one-line bullet;
  • add a documentation section to the repo-root README.md and list it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants