Welcome to TT-NN documentation!
- What is ttnn?
- Getting Started
-
Using ttnn
-
Basic Examples
- 1. Converting from and to torch tensor
- 2. Running an operation on the device
- 3. Using __getitem__ to slice the tensor
- 4. Enabling program cache
- 5. Debugging intermediate tensors
- 6. Tracing the graph of operations
- 7. Using tt_lib operation in ttnn
- 8. Enabling Logging
- 9. Supported Python Operators
- 10. Changing the string representation of the tensor
- 11. Visualize using Web Browser
- 12. Register pre- and/or post-operation hooks
- 13. Query all operations
- 14. Disable Fallbacks
-
Basic Examples
- Tensor
-
APIs
- Device
- Memory Config
-
Operations
- Core
- Tensor Creation
- Matrix Multiplication
-
Pointwise Unary
- ttnn.abs
- ttnn.acos
- ttnn.acosh
- ttnn.asin
- ttnn.asinh
- ttnn.atan
- ttnn.atan2
- ttnn.atanh
- ttnn.cbrt
- ttnn.celu
- ttnn.clip
- ttnn.clone
- ttnn.cos
- ttnn.cosh
- ttnn.deg2rad
- ttnn.digamma
- ttnn.elu
- ttnn.erf
- ttnn.erfc
- ttnn.erfinv
- ttnn.exp
- ttnn.exp2
- ttnn.expm1
- ttnn.geglu
- ttnn.gelu
- ttnn.glu
- ttnn.hardshrink
- ttnn.hardsigmoid
- ttnn.hardswish
- ttnn.hardtanh
- ttnn.heaviside
- ttnn.hypot
- ttnn.i0
- ttnn.isfinite
- ttnn.isinf
- ttnn.isnan
- ttnn.isneginf
- ttnn.isposinf
- ttnn.leaky_relu
- ttnn.lerp
- ttnn.lgamma
- ttnn.log
- ttnn.log10
- ttnn.log1p
- ttnn.log2
- ttnn.log_sigmoid
- ttnn.logical_not
- ttnn.logit
- ttnn.mish
- ttnn.multigammaln
- ttnn.neg
- ttnn.prelu
- ttnn.reglu
- ttnn.relu
- ttnn.relu6
- ttnn.rsqrt
- ttnn.sigmoid
- ttnn.sigmoid_accurate
- ttnn.sign
- ttnn.silu
- ttnn.sin
- ttnn.sinh
- ttnn.softmax
- ttnn.softplus
- ttnn.softshrink
- ttnn.softsign
- ttnn.swish
- ttnn.tan
- ttnn.tanh
- ttnn.signbit
- ttnn.polygamma
- ttnn.rad2deg
- ttnn.reciprocal
- ttnn.sqrt
- ttnn.square
- ttnn.swiglu
- ttnn.tril
- ttnn.triu
- ttnn.tanhshrink
- ttnn.threshold
-
Pointwise Binary
- ttnn.add
- ttnn.multiply
- ttnn.subtract
- ttnn.pow
- ttnn.ldexp
- ttnn.logical_and
- ttnn.logical_or
- ttnn.logical_xor
- ttnn.logaddexp
- ttnn.logaddexp2
- ttnn.xlogy
- ttnn.squared_difference
- ttnn.gtz
- ttnn.ltz
- ttnn.gez
- ttnn.lez
- ttnn.nez
- ttnn.eqz
- ttnn.gt
- ttnn.ge
- ttnn.lt
- ttnn.le
- ttnn.eq
- ttnn.ne
- ttnn.isclose
- ttnn.polyval
- ttnn.nextafter
- ttnn.maximum
- ttnn.minimum
- Pointwise Ternary
- Losses
- Reduction
- Data Movement
- Normalization
- Transformer
- Embedding
- Pooling
- Vision
- KV Cache
- Model Conversion
- Reports
- Operation Hooks
-
Tutorials
-
Tensor and Add Operation
-
Tensor and Add Operation
- Creating a tensor
- Host Storage: Borrowed vs Owned
- Data Type
- Layout
- Device storage
- Open the device
- Initialize tensors a and b with random values using torch
- Add tensor a and b
- Inspect the output tensor of the add in ttnn
- Convert to torch and inspect the attributes of the torch tensor
- Close the device
-
Tensor and Add Operation
- Matmul Operation
-
Multi-Head Attention
-
Multi-Head Attention
- Enable program cache
- Write Multi-Head Attention using ttnn
- Configuration
- Initialize activations and weights using torch
- Convert activations and weights to ttnn
- Run the first iteration of Multi-Head Attention
- Run a subsequent iteration of Multi-Head Attention
- Write optimized version of Multi-Head Attention
- Pre-process the parameters of the optimized model
- Run the first iteration of the optimized Multi-Head Attention
- Run a subsequent iteration of the optimized Multi-Head Attention
- Check that the output of the optimized version matches the output of the original implementation
- Close the device
-
Multi-Head Attention
- ttnn Tracer
- ttnn Profiling
- Resnet Basic Block
- Graphing Torch DiT_XL_2 With TTNN
-
Tensor and Add Operation
- Onboarding New Functionality
- Converting torch Model to ttnn
- Adding New ttnn Operation
- Profiling ttnn Operations
-
Dependencies
-
TT-LIB
- Overview
-
TT-LIB API through
tt_lib
-
Fallback Operations
full()
tensor_slice()
reshape()
chunk()
conv2d()
group_norm()
layer_norm()
pad()
interpolate()
repeat()
repeat_interleave()
concat()
silu()
softmax()
Conv2d
BatchNorm2d
GroupNorm
LayerNorm
MaxPool2d
AdaptiveAvgPool2d
ceil
floor
trunc
unary_fmod
binary_fmod
bitwise_not
unary_bitwise_or
unary_bitwise_and
unary_bitwise_xor
binary_bitwise_or
binary_bitwise_and
binary_bitwise_xor
unary_bitwise_left_shift
unary_bitwise_right_shift
binary_bitwise_left_shift
binary_bitwise_right_shift
torch_argmax
torch_argmin
- Experimental Operations
- Tensor
- Examples of Tensor and TT-LIB Use
-
TT-LIB
- Building and Uplifting Demos
- Placeholder title