Skip to content

Commit

Permalink
Add a check if environment is not enable.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmanzoorTT committed Oct 4, 2024
1 parent d45dfed commit a5114d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

cmake_minimum_required(VERSION 3.20)

if (NOT DEFINED ENV{TTXLA_ENV_ACTIVATED})
message(FATAL_ERROR "tt-xla environment not activated. Please run 'source venv/activate'.")
endif()

project(TT_PJRT)
cmake_policy(SET CMP0069 NEW)
Expand Down
1 change: 1 addition & 0 deletions venv/activate
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ else
pip install --upgrade pip
pip install -r requirements.txt
fi
export TTXLA_ENV_ACTIVATED=1
export TTMLIR_ENV_ACTIVATED=1
export PATH=$TTMLIR_TOOLCHAIN_DIR/bin:$PATH
if [ -n "$PROJECT_ROOT" ]; then
Expand Down

0 comments on commit a5114d5

Please sign in to comment.