Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README with build instructions for cmake #4

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading