Skip to content

Commit

Permalink
Add tt-explorer frontend fork (#1110)
Browse files Browse the repository at this point in the history
  • Loading branch information
odjuricicTT authored Oct 31, 2024
1 parent 2a2121d commit 33ac41f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions tools/explorer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
model-explorer
23 changes: 19 additions & 4 deletions tools/explorer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
include(ExternalProject)

set(TT_EXPLORER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/run.py)
set(TTMLIR_BUILD_BIN_DIR ${TTMLIR_BINARY_DIR}/bin)

set(MODEL_EXPLORER_VERSION "123046643fbe5524f40076fcffcaa642066c9c30")
ExternalProject_Add(
model-explorer
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/model-explorer
GIT_REPOSITORY https://github.com/tenstorrent/model-explorer.git
GIT_TAG ${MODEL_EXPLORER_VERSION}
GIT_PROGRESS ON
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)

add_custom_target(explorer
COMMENT "Building tt-explorer... ${TTMLIR_BIN_DIR}"
COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/* ${CMAKE_CURRENT_BINARY_DIR}
COMMAND pip install ${CMAKE_CURRENT_BINARY_DIR}/tt_adapter
DEPENDS TTMLIRPythonModules
COMMAND pip install ${CMAKE_CURRENT_SOURCE_DIR}/tt_adapter
COMMAND pip install ${CMAKE_CURRENT_SOURCE_DIR}/model-explorer/src/model-explorer/src/server/package

DEPENDS TTMLIRPythonModules model-explorer
)

add_custom_command(TARGET explorer POST_BUILD
COMMENT "Installing tt-explorer command..."
COMMAND ${CMAKE_COMMAND} -E copy ${TT_EXPLORER_SCRIPT} ${TTMLIR_BUILD_BIN_DIR}/tt-explorer
COMMAND ${CMAKE_COMMAND} -E create_symlink ${TT_EXPLORER_SCRIPT} ${TTMLIR_BUILD_BIN_DIR}/tt-explorer
COMMAND ${CMAKE_COMMAND} -E echo "Done. Run: tt-explorer to start the server."
)
3 changes: 0 additions & 3 deletions tools/explorer/tt_adapter/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name = "tt-adapter"
version = "0.0.1"
description = "Model Explorer Adapter built for TT-MLIR Compiled outputs."
readme = "README.md"
dependencies = [
"ai-edge-model-explorer>=0.1"
]

[tool.poetry]
packages = [{ include = "src/tt_adapter" }]

0 comments on commit 33ac41f

Please sign in to comment.