fix[next]: Add build configuration to the compilation fingerprint#2650
Open
edopao wants to merge 21 commits into
Open
fix[next]: Add build configuration to the compilation fingerprint#2650edopao wants to merge 21 commits into
edopao wants to merge 21 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the DaCe backend compilation workflow to incorporate DaCe configuration into the compilation fingerprint, so that different DaCe/compiler flag configurations produce separate build subfolders (avoiding cache/build-folder clashes).
Changes:
- Add a DaCe config snapshot (
dace_config_nondefaults) to theDaCeCompilerstage data used for fingerprinting. - Append a per-compiler fingerprint subfolder to the existing cache folder when setting
sdfg.build_folder. - Add a unit test intended to verify that changing
CXXFLAGS/CUDAFLAGS/HIPFLAGSresults in a different build folder.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/gt4py/next/program_processors/runners/dace/workflow/compilation.py |
Adds DaCe config snapshotting to compiler “identity” and uses a fingerprint-named subfolder for builds. |
tests/next_tests/unit_tests/program_processor_tests/runners_tests/dace_tests/test_dace_compilation.py |
Adds a regression test asserting compiler-flag changes lead to different build folders. |
20af1f4 to
261d78a
Compare
58e3273 to
b7ab4d0
Compare
…lder API Propagate the CompilableProject -> ExtensionSource rename and the new get_cache_folder signature (build_context_id) through docstrings, comments, user docs and tests. Also fix compiledb's prototype-source mismatch: the locate and create paths must share one ExtensionSource so the new folder naming (binding source folded into slug + fingerprint) resolves to the same cache folder.
edopao
commented
Jun 26, 2026
egparedes
approved these changes
Jun 26, 2026
egparedes
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Just a nitpick and the failing test, otherwise looks good.
Co-authored-by: Enrique González Paredes <enriqueg@cscs.ch>
96224ef to
36b5212
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.
Description
The compiled artifacts (build folders, SDFGs) were keyed only by a hash of the program source. As a result, changing the backend configuration — in particular DaCe's
dace.Configor the builder factory forgtfnbackends — did not invalidate the cache, so a stale artifact could be reused even though the configuration that produced it had changed.This PR includes the relevant build-time configuration into the cache-folder fingerprint so artifacts are correctly rebuilt when the configuration changes.
To make it possible, we added an optional
build_context_idtoget_cache_folder()which allows to distinguish different build contexts that produce different artifacts for the same extension source.Changes to DaCe backend
DaCeCompilercaptures the non-defaultdace.Configvalues at construction and includes them in the build context fingerprint, so an SDFG is rebuilt when the user changes the backend configuration.Changes to GTFN backend
The
builder_factoryis fingerprinted into the above-mentionedbuild_context_id. Note thatbuilder_factoryspecifies the cmake configuration.