Skip to content
Nicholas Smith edited this page Jun 24, 2024 · 1 revision

ArchAttr

TT Arch

Syntax:

#tt.arch<
  ::mlir::tt::Arch   # value
>

Enum cases:

  • grayskull (Grayskull)
  • wormhole_b0 (WormholeB0)
  • blackhole (Blackhole)

Parameters:

Parameter C++ type Description
value ::mlir::tt::Arch an enum of type Arch

ChipCapabilityAttr

TT Chip Capabilities

Syntax:

#tt.Chip_capability<
  ::mlir::tt::ChipCapability   # value
>

Enum cases:

  • pcie (PCIE)
  • host_mmio (HostMMIO)

Parameters:

Parameter C++ type Description
value ::mlir::tt::ChipCapability an enum of type ChipCapability

ChipChannelAttr

TT chip_channel attribute

Syntax:

#tt.chip_channel<
  unsigned,   # endpoint0
  unsigned   # endpoint1
>

TT chip_channel attribute

Parameters:

Parameter C++ type Description
endpoint0 unsigned
endpoint1 unsigned

ChipCoordAttr

TT chip_coord attribute

Syntax:

#tt.chip_coord<
  unsigned,   # rack
  unsigned,   # shelf
  unsigned,   # y
  unsigned   # x
>

TT chip_coord attribute

Parameters:

Parameter C++ type Description
rack unsigned
shelf unsigned
y unsigned
x unsigned

ChipDescAttr

TT chip_desc attribute

Syntax:

#tt.chip_desc<
  ArchAttr,   # arch
  ::mlir::tt::GridAttr,   # grid
  unsigned,   # l1Size
  unsigned,   # numDramChannels
  unsigned   # dramChannelSize
>

TT chip_desc attribute

Parameters:

Parameter C++ type Description
arch ArchAttr
grid ::mlir::tt::GridAttr TT grid attribute
l1Size unsigned
numDramChannels unsigned
dramChannelSize unsigned

GridAttr

TT grid attribute

Syntax:

#tt.grid<
  ::llvm::ArrayRef<int64_t>,   # shape
  AffineMap   # physical_grid_mapping
>

TT grid attribute

Parameters:

Parameter C++ type Description
shape ::llvm::ArrayRef<int64_t>
physical_grid_mapping AffineMap

IteratorTypeAttr

TT IteratorType

Syntax:

#tt.iterator_type<
  ::mlir::tt::IteratorType   # value
>

Enum cases:

  • parallel (Parallel)
  • systolic (Systolic)
  • broadcast (Broadcast)

Parameters:

Parameter C++ type Description
value ::mlir::tt::IteratorType an enum of type IteratorType

LayoutAttr

TT layout attribute

Syntax:

#tt.layout<
  ::llvm::ArrayRef<int64_t>,   # strides
  OOBVal,   # oob_val
  GridAttr,   # grid
  MemRefType   # memref
>

TT layout attribute

Parameters:

Parameter C++ type Description
strides ::llvm::ArrayRef<int64_t>
oob_val OOBVal
grid GridAttr
memref MemRefType

MemorySpaceAttr

TT MemorySpace

Syntax:

#tt.memory_space<
  ::mlir::tt::MemorySpace   # value
>

Enum cases:

  • system (System)
  • mmio (SystemMMIO)
  • dram (DeviceDRAM)
  • l1 (DeviceL1)

Parameters:

Parameter C++ type Description
value ::mlir::tt::MemorySpace an enum of type MemorySpace

OOBValAttr

TT OOBVal

Syntax:

#tt.oob_val<
  ::mlir::tt::OOBVal   # value
>

Enum cases:

  • undef (Undef)
  • zero (Zero)
  • one (One)
  • inf (Inf)
  • neginf (NegInf)

Parameters:

Parameter C++ type Description
value ::mlir::tt::OOBVal an enum of type OOBVal

OperandConstraintAttr

TT Operand Constraints

Syntax:

#tt.operand_constraint<
  ::mlir::tt::OperandConstraint   # value
>

Enum cases:

  • system (System)
  • dram (DRAM)
  • l1 (L1)
  • scalar (Scalar)
  • tile (Tile)
  • any (Any)
  • any_device (AnyDevice)
  • any_device_tile (AnyDeviceTile)

Parameters:

Parameter C++ type Description
value ::mlir::tt::OperandConstraint an enum of type OperandConstraint

SystemDescAttr

TT system_desc attribute

Syntax:

#tt.system_desc<
  ::llvm::ArrayRef<ChipDescAttr>,   # chipDescs
  ::llvm::ArrayRef<unsigned>,   # chipDescIndices
  ::llvm::ArrayRef<ChipCapabilityAttr>,   # chipCapabilities
  ::llvm::ArrayRef<ChipCoordAttr>,   # chipCoords
  ::llvm::ArrayRef<ChipChannelAttr>   # chipChannels
>

TT system_desc attribute

Parameters:

Parameter C++ type Description
chipDescs ::llvm::ArrayRef<ChipDescAttr>
chipDescIndices ::llvm::ArrayRef<unsigned>
chipCapabilities ::llvm::ArrayRef<ChipCapabilityAttr>
chipCoords ::llvm::ArrayRef<ChipCoordAttr>
chipChannels ::llvm::ArrayRef<ChipChannelAttr>