Reserved Memory Constraint - 2023.2 English

AI Engine Kernel and Graph Programming Guide (UG1079)

Document ID
UG1079
Release Date
2023-12-04
Version
2023.2 English

This constrains the location of system memory (stack and heap) for a kernel to a specific address on a specific tile. The address can be specified in one of two different ways:

  • Column, row, bankId and offset, where the tile is specified by column, row. The bankId is relative to the tile and can be set to either 0, 1, 2, or 3. The offset address is relative to the bankId, and can be set to any value from 0 to 8192 which corresponds to the maximum number of bytes in a bank.
  • Column, row, and bankId, where the bankId is relative to the tile and can be set to either 0, 1, 2, or 3.
    Note: The hardware views of each AI Engine memory is comprised of 8 banks of 128-bit width data. The aiecompiler views of each AI Engine memory is comprised of 4 banks of 256-bit width data.

Syntax

"reserved_memory": <bank_address>
<bank_address> ::= {
  "column": integer,
  "row": integer,
  "bankId": integer,
  "offset": integer
}
<bank_address> ::= {
  "column": integer,
  "row": integer,
  "bankId": integer
}

Example

{
  "NodeConstraints": {
    "mygraph.k1": {
      "reserved_memory": {
        "column": 2,
        "row": 1,
        "bankId": 3, 
        "offset": 4128
      }
    },
    "mygraph.k2": {
      "reserved_memory": {
        "column": 1,
        "row": 1,
        "bankId": 3
      }
    }
  }
}