Repository navigation
Conversation
1 of 2 tasks
egparedes
force-pushed
the
docs-next-examples
branch
2 times, most recently
from
November 23, 2026 20:43
c59ed3b to
563d0c4
Compare
Add an Examples section to the gt4py.next subsite with three complete, small applications written as executed notebooks: - Horizontal diffusion with flux limiting and concat_where boundaries. - Implicit vertical diffusion with a tridiagonal solver built from two scan operators. - Gradient, divergence and Laplacian operators on an unstructured mesh. Each one is checked against a NumPy reference and also run as a compiled program.
egparedes
added a commit
that referenced
this pull request
Nov 23, 2026
## Description Follows #3023 (documentation site infrastructure, already merged). Replaces the placeholder page of the `gt4py.next` subsite with new user documentation, written from scratch as executed MyST notebooks: every code cell runs when the site is built, so the outputs shown are the real ones and a failing example fails the build. The goal is a short and clear guide, not a complete reference: | Section | Pages | | --- | --- | | Getting started | Landing page, quickstart | | Data structures | Grids and fields (dimensions, domains, allocation, unstructured meshes) | | GT4Py DSL | Field operators, premap and neighbors (Cartesian, unstructured, `concat_where`, staggered dimensions), scan operators, programs | | Execution | Executing GT4Py programs: embedded execution, compiled backends (`dace_cpu`, `gtfn_cpu`), build cache, compiling in advance, static parameters, static domains, short GPU note | The worked examples (horizontal diffusion, implicit vertical diffusion, operators on an unstructured mesh) are split out to #3032, stacked on this PR, to be reviewed separately. ### Other changes - `test_examples` nox session: runs every executable page of the `gt4py.next` subsite, in any of its folders, including the landing page. - The toolchain guides (`HackTheToolchain.md`, `WorkflowPatterns.md`) move from `docs/user/next/advanced/` to `docs/development/next/toolchain/`, since they are developer documentation. They are still run by `test_examples`. - The figures of the small unstructured mesh are generated by a script, `docs/user/next/images/mesh_figures.py`, from the same tables used in the pages. - The `gt4py.cartesian` site is now titled "GT4Py Cartesian" instead of "GT4Py (cartesian)". - `Documentation` workflow: the site can also be deployed manually from `main` (workflow dispatch with the `deploy` input), not only from a release tag. - The Sphinx configuration of the `gt4py.next` subsite drops the DaCe SDFG viewer scripts which importing `dace` injects in the notebook outputs, since they slowed down the loading of every page. - Welcome page card and `docs/development/tools/documentation.md` updated to describe the new content. ### Notes - There is no API reference for `gt4py.next`: the docstrings of the public API are not ready to be published yet. - `concat_where` and staggered dimensions are documented and marked as experimental. - The GPU section is not executed in the build. - Some cells hide warnings printed to stderr (`remove-stderr` tag). #3022 removes those warnings in the library; the tags can be dropped once it is merged. - This content was previously part of #3005, where the first review comments are. ## Requirements - [x] All fixes and/or new features come with corresponding tests: the pages are executed in the docs build and by the `test_examples` session. - [ ] Important design decisions have been documented in the appropriate ADR inside the [docs/development/ADRs/](docs/development/ADRs/README.md) folder: not applicable. 🤖 Written by an agent on my behalf.
egparedes
force-pushed
the
docs-next-examples
branch
from
November 23, 2026 21:22
563d0c4 to
6ea0280
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follows #3024 (new
gt4py.nextuser guide, already merged). Adds an Examples section to thegt4py.nextsubsite. The examples were part of #3024 and are split out here so that they can be reviewed separately.Three complete, small applications, written from scratch as executed MyST notebooks (they are not taken from the workshop material):
concat_wherefor the boundariesEach example is checked against a NumPy reference, and the horizontal and unstructured ones are also run as a program compiled with
gtx.gtfn_cpuand compared with embedded execution.Other changes
docs/development/tools/documentation.mdmentions theexamples/folder.The pages are executed by the docs build and by the
test_examplesnox session, like the rest of the guide.Requirements
test_examplessession.🤖 Written by an agent on my behalf.