Deeploy.TilingExtension.TilingCodegen.TilingSchedule
- class Deeploy.TilingExtension.TilingCodegen.TilingSchedule(inputBaseOffsets: Dict[str, List[int]], outputBaseOffsets: Dict[str, List[int]], inputLoadSchedule: List[Dict[str, HyperRectangle]], outputLoadSchedule: List[Dict[str, HyperRectangle]])
Bases:
objectRepresents a complete schedule for tiled execution of neural network operations.
A TilingSchedule defines how data should be loaded, processed, and stored during tiled execution. It specifies the memory offsets for input and output tensors, as well as the hyperrectangles that define which regions of data are processed in each tiling step.
- Variables:
inputBaseOffsets (Dict[str, List[int]]) – Dictionary mapping tensor names to lists of base memory offsets for input tiles. Each list should have length equal to the number of tiles.
outputBaseOffsets (Dict[str, List[int]]) – Dictionary mapping tensor names to lists of base memory offsets for output tiles. Each list should have length equal to the number of tiles.
inputLoadSchedule (List[Dict[str, HyperRectangle]]) – List of dictionaries, one per tile, mapping tensor names to the hyperrectangles that should be loaded as input for that tile.
outputLoadSchedule (List[Dict[str, HyperRectangle]]) – List of dictionaries, one per tile, mapping tensor names to the hyperrectangles that should be stored as output for that tile.
- Parameters:
inputBaseOffsets (Dict[str, List[int]]) – Input tensor base offsets for each tile.
outputBaseOffsets (Dict[str, List[int]]) – Output tensor base offsets for each tile.
inputLoadSchedule (List[Dict[str, HyperRectangle]]) – Input loading schedule for each tile.
outputLoadSchedule (List[Dict[str, HyperRectangle]]) – Output storing schedule for each tile.
Notes
The lengths of inputLoadSchedule and outputLoadSchedule should typically be equal, representing the same number of tiles. Each schedule step corresponds to processing one tile of the operation.
Methods
- __init__(inputBaseOffsets: Dict[str, List[int]], outputBaseOffsets: Dict[str, List[int]], inputLoadSchedule: List[Dict[str, HyperRectangle]], outputLoadSchedule: List[Dict[str, HyperRectangle]])
Initialize a TilingSchedule with specified offsets and load schedules.
- Parameters:
inputBaseOffsets (Dict[str, List[int]]) – Input tensor base offsets for each tile.
outputBaseOffsets (Dict[str, List[int]]) – Output tensor base offsets for each tile.
inputLoadSchedule (List[Dict[str, HyperRectangle]]) – Input loading schedule for each tile.
outputLoadSchedule (List[Dict[str, HyperRectangle]]) – Output storing schedule for each tile.
- Raises:
AssertionError – If any key from inputBaseOffsets is missing from a schedule step in inputLoadSchedule, or if any key from outputBaseOffsets is missing from a schedule step in outputLoadSchedule.
__init__(inputBaseOffsets, ...)Initialize a TilingSchedule with specified offsets and load schedules.
Attributes
inputBaseOffsetsoutputBaseOffsetsinputLoadScheduleoutputLoadSchedule