-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README with build instructions for cmake.
- Loading branch information
1 parent
179bbda
commit 368f83f
Showing
1 changed file
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |