-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding install script to be consumed by pybuda. Misc - env variable r…
…ename (#119) * Fixing ttmlir project for integration with pybuda cmake * Fixing lint errors
- Loading branch information
1 parent
571cf9e
commit 02ee9fd
Showing
7 changed files
with
60 additions
and
40 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
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,5 +1,5 @@ | ||
# clang-tidy setup | ||
add_custom_target(run-clang-tidy-install COMMAND cp ${TTMLIR_TOOLCHAIN}/src/llvm-project/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py ${TTMLIR_TOOLCHAIN}/bin/) | ||
add_custom_target(run-clang-tidy-install COMMAND cp ${TTMLIR_TOOLCHAIN_DIR}/src/llvm-project/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py ${TTMLIR_TOOLCHAIN_DIR}/bin/) | ||
add_custom_target(clang-tidy-filter-out-external-srcs COMMAND python3 ${TTMLIR_SOURCE_DIR}/tools/scripts/filter-compile-commands.py ${TTMLIR_BINARY_DIR}/compile_commands.json ${TTMLIR_SOURCE_DIR}) | ||
add_custom_target(clang-tidy COMMAND run-clang-tidy.py -p ${PROJECT_BINARY_DIR} -warnings-as-errors '*' DEPENDS clang-tidy-filter-out-external-srcs run-clang-tidy-install) | ||
add_custom_target(clang-format COMMAND git-clang-format) |
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
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
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,8 +1,16 @@ | ||
TTMLIR_VENV="${TTMLIR_VENV:-/opt/ttmlir-toolchain/venv}" | ||
TOOLCHAIN_ENV="${TOOLCHAIN_ENV:-/opt/ttmlir-toolchain}" | ||
[ -f $TTMLIR_VENV/bin/activate ] && source $TTMLIR_VENV/bin/activate | ||
# Step 1: Check if TTMLIR_TOOLCHAIN_DIR is already set, if not, set it to /opt/ttmlir-toolchain | ||
if [ -z "${TTMLIR_TOOLCHAIN_DIR}" ]; then | ||
export TTMLIR_TOOLCHAIN_DIR="/opt/ttmlir-toolchain" | ||
fi | ||
|
||
# Step 2: Check if TTMLIR_VENV_DIR is already set, if not, set it to the venv directory inside TTMLIR_TOOLCHAIN_DIR | ||
if [ -z "${TTMLIR_VENV_DIR}" ]; then | ||
export TTMLIR_VENV_DIR="${TTMLIR_TOOLCHAIN_DIR}/venv" | ||
fi | ||
|
||
[ -f $TTMLIR_VENV_DIR/bin/activate ] && source $TTMLIR_VENV_DIR/bin/activate | ||
export TTMLIR_ENV_ACTIVATED=1 | ||
export PATH=$TOOLCHAIN_ENV/bin:$TOOLCHAIN_ENV/venv/bin:$PATH | ||
export PATH=$TTMLIR_TOOLCHAIN_DIR/bin:$TTMLIR_TOOLCHAIN_DIR/venv/bin:$PATH | ||
export TT_METAL_HOME="$(pwd)/third_party/tt-metal/src/tt-metal" | ||
export PYTHONPATH="$(pwd)/build/python_packages:$(pwd)/.local/toolchain/python_packages/mlir_core" | ||
export ARCH_NAME="${ARCH_NAME:-wormhole_b0}" |
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
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