Skip to content

Add a config option for storing lineinfo into the SDFG#2321

Merged
tbennun merged 3 commits into
spcl:mainfrom
romanc:romanc/debug-info-config
Apr 18, 2026
Merged

Add a config option for storing lineinfo into the SDFG#2321
tbennun merged 3 commits into
spcl:mainfrom
romanc:romanc/debug-info-config

Conversation

@romanc

@romanc romanc commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

When we build an SDFG, there's the option to store DebugInfo with some SDFG nodes. For example, this DebugInfo can be used to store file & line information of parsed code when building an SDFG. When using the SDFG API, the default is to inspect the python stack and extract file & line information from there. These calls to inspect can/will be expensive, especially for bigger graphs.

This PR proposes to add a configuration option, compiler.lineinfo, to drive this behavior from a single place. The defaults are kept as is, i.e. we keep inspecting the stack by default. However, the config option allows a central pace to turn DebugInfo off, which could be configured in production scenarios.

@romanc romanc changed the title WIP: make debug info configurable Add a config option for storing lineinfo into the SDFG Mar 12, 2026
@romanc romanc marked this pull request as ready for review March 12, 2026 13:54
@tbennun tbennun enabled auto-merge April 17, 2026 17:31
@tbennun

tbennun commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

cscs-ci run

auto-merge was automatically disabled April 18, 2026 06:12

Head branch was pushed to by a user without write access

@romanc romanc force-pushed the romanc/debug-info-config branch from 7669230 to 045403e Compare April 18, 2026 06:12
@romanc

romanc commented Apr 18, 2026

Copy link
Copy Markdown
Contributor Author

rebased to fix a conflict in the imports of state.py, which were also touched by PR #2318. No other changes.

@tbennun

tbennun commented Apr 18, 2026

Copy link
Copy Markdown
Collaborator

cscs-ci run

@tbennun tbennun enabled auto-merge April 18, 2026 07:51
@tbennun tbennun added this pull request to the merge queue Apr 18, 2026
Merged via the queue into spcl:main with commit 51790b5 Apr 18, 2026
12 checks passed
@tbennun tbennun deleted the romanc/debug-info-config branch April 18, 2026 09:10
romanc added a commit to romanc/dace that referenced this pull request Apr 24, 2026
## Description

In PR spcl#2321 we introduced a way to turn
of automatic stack inspection when adding a node to a state without
explicitly stating debug info (such as file name, line info, ...). Since
merging this PR, we get a ton of `DeprecationWarning`s from code added
in `_get_debug_info()`.

In a first attempt (see PR spcl#2344), we
tried to work around the issue by setting `._default_line_info` on the
state. This method proved to be very verbose and unnecessarily
complicates parsing, where we have a legitimate use-case for explicitly
passing along an explicit `DebugInfo`.

This PR suggests to keep the API of `state.add_*()` functions as before,
partially reverting changes from PR
spcl#2321. Doing so, we can drop the
deprecation warnings because nothing changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants