Deeploy.TilingExtension.MemoryScheduler.MemoryScheduler

class Deeploy.TilingExtension.MemoryScheduler.MemoryScheduler(stringSuffix: str, tileScheduler: bool, seed: int = 1996080121)

Bases: object

Methods

__init__(stringSuffix: str, tileScheduler: bool, seed: int = 1996080121)

__init__(stringSuffix, tileScheduler[, seed])

annotateSolution(ctxt, tilerModel)

constraintTileBuffersWithOverlappingLifetime(...)

JUNGVI: This method adds the necessay constraints for tiling to be performed before the static memory allocation of the tile buffers. To perform static memory allocation after tiling (i.e. decouple tiling and memory alloc), we need to do two assumptions 1. All tile buffers for each node have overlapping lifetime, so we can find their memory footprint by just summing their sizes and hence we don't need to know the specific memory allocation. This assumption is true as soon as we don't do tile several nodes together (ask me if you don't know what I mean here). 2. We don't allocate the tensors of the graph in the same memory level than the tiles (for instance we put all tensor in L2 and the tiles only live in L1).

getBlockVector(patternIdx, memoryLevel)

getCost(tilerModel, patternIdx, memoryLevel)

getHVector(tilerModel, patternIdx, memoryLevel)

getPMatrix(tilerModel, patternIdx, memoryLevel)

getSymbolicCostName(patternIdx, memoryLevel)

heuristicPermutation(adjacencyMatrix, costVector)

overlap(lifetimeA, lifetimeB)

scheduleMemoryConstraints(tilerModel, ctxt, ...)

Attributes

byteAlignment

static constraintTileBuffersWithOverlappingLifetime(tilerModel: TilerModel, ctxt: NetworkContext, patternMemoryConstraint: PatternMemoryConstraints, memoryHierarchy: MemoryHierarchy)

JUNGVI: This method adds the necessay constraints for tiling to be performed before the static memory allocation of the tile buffers. To perform static memory allocation after tiling (i.e. decouple tiling and memory alloc), we need to do two assumptions

  1. All tile buffers for each node have overlapping lifetime, so we can find their memory footprint by just summing their sizes and hence we don’t need to know the specific memory allocation. This assumption is true as soon as we don’t do tile several nodes together (ask me if you don’t know what I mean here).

  2. We don’t allocate the tensors of the graph in the same memory level than the tiles (for instance we put all tensor in L2 and the tiles only live in L1).