Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor[cartesian]: unexpanded sdfg cleanups #1860

Merged
merged 5 commits into from
Feb 17, 2025

Conversation

romanc
Copy link
Contributor

@romanc romanc commented Feb 13, 2025

Description

Refactors from (recent) debugging sessions around transient arrays in the "unexpanded SDFG" (the one with the library nodes):

  • Remove unused **kwargs from OirSDFGBuilder
  • Forward debugging information about transient arrays to DaCe
  • Use a (constant) variable for connector prefixes of data going in to/out of the library nodes
  • Configure the lifetime of transient arrays directly in OirSDFGBuilder

This is a follow-up from PR #1843. In this PR, we separate the DaCe backend cleanup from the refactor around (re-)using DeviceType instead of "cpu" | "gpu" string literals.

Requirements

  • All fixes and/or new features come with corresponding tests.
    Should be covered by existing tests.
  • Important design decisions have been documented in the appropriate ADR inside the docs/development/ADRs/ folder.
    N/A

Roman Cattaneo and others added 4 commits February 13, 2025 17:22
Forward debug info from gt4py to dace if we know it. If we don't know,
just don't specify instead of setting `DebugInfo(0)`.

Moved `get_dace_debuginfo()` one folder higher from expansion utils into
"general" dace utils because its not only used in expansion.
Transients are added in OirSDFGBuilder, where no array lifetime is
configured. After building that SDFG, the lifetime of all transients is
manually set to `Persistent` (which is an optimization leading to less
frequent memory allocation in case a kernel is called multiple times).
In this commit we directly specify the transient's lifetime when
building the SDFG.
Copy link
Contributor

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@romanc romanc merged commit 3f85165 into GridTools:main Feb 17, 2025
25 checks passed
@romanc romanc deleted the romanc/unexpanded-sdfg-cleanup-part-1 branch February 17, 2025 09:05
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