refactor[next]: rename Backend to Toolchain and restructure artifact loading - #2741
Open
egparedes wants to merge 1 commit into
Open
refactor[next]: rename Backend to Toolchain and restructure artifact loading#2741egparedes wants to merge 1 commit into
egparedes wants to merge 1 commit into
Conversation
egparedes
marked this pull request as ready for review
July 30, 2026 17:58
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
from
July 30, 2026 17:58
40c134b to
63713c3
Compare
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
from
July 31, 2026 16:15
63713c3 to
5dfb78f
Compare
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
from
August 17, 2026 15:07
5dfb78f to
ef9785b
Compare
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
from
August 20, 2026 16:17
ef9785b to
70b9425
Compare
egparedes
changed the base branch from
otf-split-1-stages-artifacts
to
otf-split-1b-plain-builders
August 20, 2026 16:21
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
from
August 20, 2026 16:52
70b9425 to
ee68592
Compare
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
2 times, most recently
from
August 26, 2026 11:05
49edc24 to
a78e837
Compare
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
from
August 28, 2026 13:06
a78e837 to
f743ebd
Compare
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
from
August 28, 2026 13:09
f743ebd to
4fced1e
Compare
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
from
September 1, 2026 18:30
4fced1e to
41da37c
Compare
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
from
September 9, 2026 16:34
41da37c to
247de77
Compare
…loading Adopt the vocabulary ADR 0017 already defines: the root object that carries a program from DSL source to a runnable callable is the *toolchain*, not the *backend* (which is one of its two halves). Renamed: - `next.backend.Backend` -> `next.backend.Toolchain` - `Toolchain.transforms` -> `Toolchain.frontend` - `Toolchain.executor` -> `Toolchain.backend` - `otf.workflow.ConcreteArtifact` -> `otf.workflow.ProgramWithArgs` - `ProgramWithArgs.data` -> `ProgramWithArgs.definition` - `otf.stages.CompilableProgramDef` -> `otf.stages.CompilableProgram` - `gtx.typing.Backend` -> `gtx.typing.Toolchain` - `ffront.foast_to_past.ItirShim.definition` -> `ItirShim.operator_def`, freeing the name for the renamed `ProgramWithArgs` field it now wraps Beyond the renames, this restructures how artifacts are loaded. `Backend.load_artifact()` was an overridable method, so a toolchain needing backend-specific runtime data in the loaded program subclassed the root object (ADR 0027's dace external-workspace path did exactly that). It becomes `Toolchain.loading`, a plain step field defaulting to `artifacts.load_artifact`, so customization is composition-time like the other three fields. The `DaCeBackend` subclass is therefore deleted and `run_dace_*` are plain `Toolchain` instances carrying a `DaCeLoadingStep`; the public path to the workspace moves from `backend.external_workspace` to `backend.loading.external_workspace`. This also keeps subclassing off the load path, which matters because per ADR 0024 a toolchain that customizes `compile` is opaque to the process-pool runner. These are hard renames: no deprecation aliases are kept, so downstream has to move in this release rather than drift on a compatibility layer. An alias would have been partial anyway -- constructing with the old keyword names cannot be aliased on a dataclass without hand-writing `__init__` -- and a half-working compatibility layer is harder to act on than one loud break. Also resolves the `TODO(tehrengruber)` in `backend.py` asking for exactly this rename, and records the decision in a new ADR 0029, which partially supersedes ADR 0011 and refines ADR 0017. Programs compile and run exactly as before. Fingerprints embed qualified class and field names, so the `ProgramWithArgs` rename rotates the two persistent translation-cache keys (gtfn, dace); this is the second such rotation in the stack, after the module move that created `otf.workflow.ConcreteArtifact`. Each is a cold rebuild rather than a stale hit because the key itself changes -- entries written under the old name are simply never looked up. On top of that, `BUILD_CACHE_VERSION_ID` (the gt4py version) already rotates these keys at every release, so the cost is nothing extra for anyone crossing a release boundary. The two rotations collapse into one if the stack lands in a single release.
egparedes
force-pushed
the
otf-split-2-toolchain-naming
branch
from
September 9, 2026 16:51
247de77 to
0e18073
Compare
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.
Adopt the vocabulary ADR 0017 already defines: the root object that carries a
program from DSL source to a runnable callable is the toolchain, not the
backend (which is one of its two halves). Renamed:
next.backend.Backend->next.backend.ToolchainToolchain.transforms->Toolchain.frontendToolchain.executor->Toolchain.backendotf.workflow.ConcreteArtifact->otf.workflow.ProgramWithArgsProgramWithArgs.data->ProgramWithArgs.definitionotf.stages.CompilableProgramDef->otf.stages.CompilableProgramgtx.typing.Backend->gtx.typing.Toolchainffront.foast_to_past.ItirShim.definition->ItirShim.operator_def,freeing the name for the renamed
ProgramWithArgsfield it now wrapsBeyond the renames, this restructures how artifacts are loaded.
Backend.load_artifact()was an overridable method, so a toolchain needingbackend-specific runtime data in the loaded program subclassed the root object
(ADR 0027's dace external-workspace path did exactly that). It becomes
Toolchain.loading, a plain step field defaulting toartifacts.load_artifact,so customization is composition-time like the other three fields. The
DaCeBackendsubclass is therefore deleted andrun_dace_*are plainToolchaininstances carrying aDaCeLoadingStep; the public path to theworkspace moves from
backend.external_workspacetobackend.loading.external_workspace. This also keeps subclassing off the loadpath, which matters because per ADR 0024 a toolchain that customizes
compileis opaque to the process-pool runner.
These are hard renames: no deprecation aliases are kept, so downstream has to
move in this release rather than drift on a compatibility layer. An alias would
have been partial anyway -- constructing with the old keyword names cannot be
aliased on a dataclass without hand-writing
__init__-- and a half-workingcompatibility layer is harder to act on than one loud break.
Also resolves the
TODO(tehrengruber)inbackend.pyasking for exactly thisrename, and records the decision in a new ADR 0029, which partially supersedes
ADR 0011 and refines ADR 0017.
Programs compile and run exactly as before. Fingerprints embed qualified class
and field names, so the
ProgramWithArgsrename rotates the two persistenttranslation-cache keys (gtfn, dace); this is the second such rotation in the
stack, after the module move that created
otf.workflow.ConcreteArtifact.Each is a cold rebuild rather than a stale hit because the key itself changes
-- entries written under the old name are simply never looked up. On top of
that,
BUILD_CACHE_VERSION_ID(the gt4py version) already rotates these keysat every release, so the cost is nothing extra for anyone crossing a release
boundary. The two rotations collapse into one if the stack lands in a single
release.