Skip to content

[Orchestration/Performance] Transient memory scoping & transformation #267

@FlorianDeconinck

Description

@FlorianDeconinck

With the introduction of transient in the orchestration pipeline we have the basis for two central cache-related optimization:

  • Refining dimensionality of temporaries (RefinedNestedAccess pass in DaCe)
  • Remove/replace fields that are no longer useful after reduction and merge (DeadFlowElimination in DaCe)

One issue is that all fields are considered lifetime.Persistent in the DaCe -> GT4Py bridge. Technically, those should be tagged as lifetime.Scope when orchestrating. lifetime.Persistent allows us to properly pool memory, a feature we need to keep. So we will need to re-scope to lifetime.Scope at first, then once optmization is done, de-scope back to Persistent and pool.

Flow of optimization for transient:

  1. Re-scope transient in to lifetime.Scope (gt4py-dace bridge, potentially only for orchestration)
  2. Apply merging of IJ or K loops
  3. Apply RefineNestedAccess to reduce dimensionality
  4. Simplify (scalarize & DeadFlowElimination)
  5. For any transient still alive, de-scope to lifetime.Persistent and flag has pool

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or requestPerformancePerformance related tasks & PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions