From 9cdbbce0adc9e1aa2c0e6259802d2b6aee217b1a Mon Sep 17 00:00:00 2001 From: Nick Smith <127986401+nsmithtt@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:05:50 -0500 Subject: [PATCH] Add documentation about namespaces (#66) --- docs/src/internal-build.md | 2 ++ docs/src/project-structure.md | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/docs/src/internal-build.md b/docs/src/internal-build.md index a19e33d7d7..f0be460239 100644 --- a/docs/src/internal-build.md +++ b/docs/src/internal-build.md @@ -1,6 +1,8 @@ # Internal Build Notes / IRD - When building the runtime we must use Ubuntu 20.04 docker image + - When making an IRD reservation use `--docker-image + yyz-gitlab.local.tenstorrent.com:5005/tenstorrent/infra/ird-ubuntu-20-04-amd64:latest` - You'll have to manaully install a newer version of cmake, at least 3.20, the easiest way to do this is to `pip install cmake` and make sure this one is in your path - You'll want LLVM installation to persist IRD reservations, you can achieve this by: - mkdir /localdev/$USER/ttmlir-toolchain diff --git a/docs/src/project-structure.md b/docs/src/project-structure.md index 95d3542c47..3a5e2968d7 100644 --- a/docs/src/project-structure.md +++ b/docs/src/project-structure.md @@ -16,3 +16,17 @@ - `tools/python`: Python bindings for the runtime, currently this is where `ttrt` is implemented - `test`: Test suite - `tools/ttmlir-opt`: TTMLIR optimizer driver + +# Namespaces + +- `mlir`: On the compiler side, we use the MLIR namespace for all MLIR types and operations and subnamespace for our dialects. + - `mlir::tt`: Everything ttmlir related is underneath this namespace. Since + we need to subnamespace under `mlir`, just `mlir::tt` seemed better than + `mlir::ttmlir` which feels redundant. + - `mlir::tt::ttir`: The TTIR dialect namespace + - `mlir::tt::ttnn`: The TTNN dialect namespace + - `mlir::tt::ttmetal`: The TTMetal dialect namespace + - `mlir::tt::ttkernel`: The TTKernel dialect namespace +- `tt::runtime`: On the runtime side, we use the `tt::runtime` namespace for all runtime types and operations. + - `tt::runtime::ttnn`: The TTNN runtime namespace + - `tt::runtime::ttmetal`: The TTMetal runtime namespace (not implemented)