From 368f83f30c91d1777b206a34b044eb439afd13a0 Mon Sep 17 00:00:00 2001 From: Milan Topalovic Date: Mon, 22 Jul 2024 13:55:40 +0000 Subject: [PATCH] Update README with build instructions for cmake. --- README.md | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 08d436311..c1d9056cc 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,28 @@ -1. Build environment - This will download all dependencies needed for pybuda. - source env/activate - To load the environment variables for the project. - cmake -B env/build env - cmake --build env/build +### Building dependencies +* `cmake` +* `clang` +* `Ninja` - sudo apt-get install ninja-build -2. Build pybuda - source env/activate - To load the environment variables for the project and activate the virtual environment. - cmake -B build . - cmake -G Ninja --build build +### Building environment +This is one off step. It will pull all dependencies needed for tt-forge. -3. Running pybuda - source env/activate +* `git submodule update --init --recursive -f` +* `source env/activate` +* `cmake -B env/build env` +* `cmake --build env/build` -Environment variables: - TTMLIR_TOOLCHAIN_DIR - points to toolchain dir where dependencies of TTLMIR will be installed. If not defined - it defaults to /opt/ttmlir-toolchain - TTMLIR_VENV_DIR - points to virtual environment directory of TTMLIR.If not defined - it defaults to /opt/ttmlir-toolchain/venv - PYBUDA_TOOLCHAIN_DIR - points to toolchain dir where dependencies of PyBuda will be installed. If not defined - it defaults to /opt/pybuda-toolchain - PYBUDA_VENV_DIR - points to virtual environment directory of Pybuda. If not defined - it defaults to /opt/pybuda-toolchain/venv +### Build tt-forge +* `source env/activate` +* `cmake -G Ninja --build build .` +* `cmake --build build` + +### Cleanup +* `rm -rf build` - to cleanup tt-forge build artifacts. +* `./clean_all.sh` - to cleanup all build artifacts (tt-forge/tvm/tt-mlir/tt-metal). This will not remove toolchain dependencies. + +### Environment variables: +* `TTMLIR_TOOLCHAIN_DIR` - points to toolchain dir where dependencies of TTLMIR will be installed. If not defined it defaults to /opt/ttmlir-toolchain +* `TTMLIR_VENV_DIR` - points to virtual environment directory of TTMLIR.If not defined it defaults to /opt/ttmlir-toolchain/venv +* `PYBUDA_TOOLCHAIN_DIR` - points to toolchain dir where dependencies of PyBuda will be installed. If not defined it defaults to /opt/pybuda-toolchain +* `PYBUDA_VENV_DIR` - points to virtual environment directory of tt-forge. If not defined it defaults to /opt/pybuda-toolchain/venv +* `PYBUDA_PYTHON_VERSION` - set to override python version. If not defined it defaults to python3.10