Skip to content

Commit

Permalink
Merge pull request #4 from tenstorrent/milant/readme_fixup
Browse files Browse the repository at this point in the history
Update README with build instructions for cmake
  • Loading branch information
mtopalovicTT authored Jul 22, 2024
2 parents 179bbda + 368f83f commit 10d3fdf
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 10d3fdf

Please sign in to comment.