Skip to content

[Refactor] Tiler: read the multi-valued aliases set instead of the legacy _alias #201

Description

@lee2716

Summary

VariableBuffer already exposes a modern, multi-valued alias set
(self.aliases: Set[str], Deeploy/DeeployTypes.py), but the tiling
machinery (TilerExtension, MemoryScheduler) still reads the legacy
single-valued _alias attribute. As a result, templates that need
alias-based pointer passthrough during tiling have to set the legacy
_alias as a workaround, in addition to populating aliases.

Where the legacy attribute is read

  • Deeploy/TilingExtension/TilerExtension.py (~L299, L336, L339)
  • Deeploy/TilingExtension/MemoryScheduler.py (~L304, L372, L658-660)

The workaround it forces

  • Deeploy/Targets/Generic/Templates/ReshapeTemplate.py — sets
    bufferOut._alias = bufferIn.name on top of bufferOut.aliases.add(...).
  • Deeploy/Targets/PULPOpen/Templates/ReshapeTemplate.py — same hack in a
    subclass.

Proposed fix

Make TilerExtension and MemoryScheduler consume buffer.aliases (the set)
instead of buffer._alias. This:

  1. supports multiple aliases per buffer (the single-valued _alias cannot);
  2. lets us drop the _alias workaround from the Reshape templates.

Scope / notes

  • Touches tiling core (DeeployTypes.py, TilerExtension.py,
    MemoryScheduler.py) and therefore affects all platforms, so it belongs in
    its own PR.
  • Discussed in PR Add FP32 operators and tiling support for MicroLlama on Snitch  #153 (FP32 MicroLlama on Snitch), where the workaround was
    kept intentionally following the ReshapeTemplate subclass pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions