perf[cartesian]: reduce SDFG construction time in dace backends#2519
Merged
romanc merged 2 commits intoGridTools:mainfrom Mar 10, 2026
Merged
perf[cartesian]: reduce SDFG construction time in dace backends#2519romanc merged 2 commits intoGridTools:mainfrom
romanc merged 2 commits intoGridTools:mainfrom
Conversation
Use a fake `DebugInfo` object to avoid calls to `inspect()` which would anyway not return useful debug information since it will just point to `dace_backend.py` and not the parsed code.
7 tasks
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
This PR reduces SDFG construction time in dace backends. It does so by
DebugInfoobject when adding read/write nodes and nested SDFGs. If noDebugInfoobject is given (the current state), dace will go and inspect the python stack to figure out where (in the python world) this access / nested SDFG was added. This call is first slow and second not really useful because it would just point to a line somewhere indace_backend.pyinstead of pointing to user code. If we wanted to point to user code, we'd need to patch this information all the way from the OIR (through the schedule tree) to the SDFG that we are freezing. There might be better ways to freeze origin/domain into the SDFG. Exploring so is saved for later, see [Build] Orchestration build times & cache re-usability NOAA-GFDL/NDSL#397.sdfg.validate()which have been deployed in a bunch of places when we built the gt4py/dace bridge and during the oir -> stree -> sdfg bridge. While these are important debugging tools while working on the dace backend and/or orchestration pipeline, they shouldn't end up in production.Requirements
Covered by existing tests.
N/A