1. Introduction
  2. User Guide
  3. 1. Getting Started
    1. 1.1. Docker Notes
    2. 1.2. Ubuntu VM on macOS
  4. 2. Testing
    1. 2.1. Lit testing
    2. 2.2. EmitC testing
  5. 3. Tools
    1. 3.1. ttmlir-opt
    2. 3.2. ttmlir-translate
    3. 3.3. ttrt
    4. 3.4. ttir-builder
      1. 3.4.1. builder
      2. 3.4.2. Adding a TTIR op
    5. 3.5. stablehlo-builder
    6. 3.6. tt-explorer
      1. 3.6.1. UI & changes to Model Explorer
      2. 3.6.2. CLI
      3. 3.6.3. API usage & reference
      4. 3.6.4. Roadmap
    7. 3.7. tt-alchemist
    8. 3.8. ttnn-standalone
  6. 4. Optimizer
  7. 5. PyKernel
  8. 6. Creating bug repros for TTNN
  9. 7. Python Bindings
  10. 8. Flatbuffers
  11. 9. CI
  12. 10. Additional Reading
  13. 11. Code of Conduct
  14. Code Documentation
  15. 12. Project Structure
  16. 13. Dialects Overview
  17. 14. Guidelines
    1. 14.1. Coding Guidelines
    2. 14.2. TTNN Dialect Guidelines
  18. 15. Adding an op
  19. 16. Decomposing an op in TTIR
  20. 17. Docs & Doxygen
  21. 18. Specifications
    1. 18.1. Runtime Stitching
    2. 18.2. Tensor Layout
    3. 18.3. Device
  22. Dialect Definitions
  23. 19. EmitPy
    1. 19.1. EmitPyOp
  24. 20. TTCore
    1. 20.1. TTCoreAttr
    2. 20.2. TTCoreOp
    3. 20.3. TTCoreType
  25. 21. TTIR
    1. 21.1. TTIROp
  26. 22. TTKernel
    1. 22.1. TTKernelAttr
    2. 22.2. TTKernelOp
    3. 22.3. TTKernelType
  27. 23. TTMetal
    1. 23.1. TTMetalOp
  28. 24. TTNN
    1. 24.1. TTNNOp

tt-mlir documentation

builder.apis

class builder.base.builder.TypeInfo(dtype: 'torch.dtype', scale: 'Optional[float]' = None, zero_point: 'Optional[int]' = None)

Bases: object

  • Parameters:
    • dtype (dtype)
    • scale (float | None)
    • zero_point (int | None)

dtype : dtype

scale : float | None = None

zero_point : int | None = None

class builder.base.builder.Golden(tensor: 'Union[torch.Tensor, ShardedTensor]', seed: 'Optional[int]' = None)

Bases: object

  • Parameters:
    • tensor (Tensor | ShardedTensor)
    • seed (int | None)

contiguous()

  • Return type: Golden

seed : int | None = None

tensor : Tensor | ShardedTensor

class builder.base.builder.GoldenCheckLevel(value)

Bases: Enum

An enumeration.

DISABLED = 1

GRAPH_LEVEL = 3

OP_LEVEL = 2

builder.base.builder.Operand

alias of Value | OpView | Operation

builder.base.builder.Shape

alias of List[int] | Tuple[int, …]