Add NanoVDB TEACHME interactive tutorial + docs-compile test harness - #2226
Add NanoVDB TEACHME interactive tutorial + docs-compile test harness#2226harrism wants to merge 4 commits into
Conversation
be3d2b9 to
c4c5e8e
Compare
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>
There was a problem hiding this comment.
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.
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>
|
Thanks Ken — pendingchanges added in 94c0469, as a New Features bullet in 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 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 Happy to fix the discoverability whichever way you prefer — tell me which you meant by "top-level README" and I'll do it:
|
Adds
doc/nanovdb/TEACHME/— an interactive, LLM-guided tutorial for theNanoVDB user API, plus a test harness that keeps it from drifting from the
real headers.
nanovdb_user_lesson.md) — 10 modules: sparse-gridfoundations,
GridHandle/IO,ReadAccessor,NodeManager, math + sampling +HDDA, GPU kernels, GPU grid builders (
PointsToGrid/MeshToGrid), topologyoperators + data re-homing (
Injection),IndexGrid/VoxelBlockManager,and OpenVDB ↔ NanoVDB conversion.
nanovdb_user_cheatsheet.md) — one-page API reference.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 headerreference. ~64 blocks compile green; run
test/run.sh. This is in the samespirit as the doc-quality CI gates being added in #2217.
A CI workflow (
.github/workflows/teachme.yml) runs the harness whenever theNanoVDB headers (
nanovdb/nanovdb/**) or the tutorial change, so an API changethat breaks a lesson is caught automatically. It's compile-only (~90s on a
standard runner, no GPU) and reuses the existing
aswf/ci-openvdbCUDA image.Notes
the runnable end-to-end check.