From d8866e30dbb9250e3b69a6a60278a21077fac5b7 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Wed, 24 Jul 2024 12:40:00 -0700 Subject: [PATCH] Move sentencepiece to extension/llm/third-party (#4388) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/4388 bypass-github-export-checks bypass-github-pytorch-ci-checks bypass-github-executorch-ci-checks Reviewed By: helunwencser Differential Revision: D60158652 fbshipit-source-id: 7c3f7f02cfb0c0e4bdd0e44845d61ed39fd2fd5d --- .gitmodules | 6 +++--- examples/models/phi-3-mini/CMakeLists.txt | 6 +++--- .../phi-3-mini => extension/llm}/third-party/sentencepiece | 0 3 files changed, 6 insertions(+), 6 deletions(-) rename {examples/models/phi-3-mini => extension/llm}/third-party/sentencepiece (100%) diff --git a/.gitmodules b/.gitmodules index 62c5f9cd81..1881dd897b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,9 +28,6 @@ [submodule "backends/xnnpack/third-party/pthreadpool"] path = backends/xnnpack/third-party/pthreadpool url = https://github.com/Maratyszcza/pthreadpool.git -[submodule "examples/models/phi-3-mini/third-party/sentencepiece"] - path = examples/models/phi-3-mini/third-party/sentencepiece - url = https://github.com/google/sentencepiece.git [submodule "examples/third-party/LLaVA"] path = examples/third-party/LLaVA url = https://github.com/haotian-liu/LLaVA.git @@ -43,6 +40,9 @@ [submodule "extension/llm/third-party/re2"] path = extension/llm/third-party/re2 url = https://github.com/google/re2.git +[submodule "extension/llm/third-party/sentencepiece"] + path = extension/llm/third-party/sentencepiece + url = https://github.com/google/sentencepiece.git [submodule "kernels/optimized/third-party/eigen"] path = kernels/optimized/third-party/eigen url = https://gitlab.com/libeigen/eigen.git diff --git a/examples/models/phi-3-mini/CMakeLists.txt b/examples/models/phi-3-mini/CMakeLists.txt index c09024be9b..5dddf7eb71 100644 --- a/examples/models/phi-3-mini/CMakeLists.txt +++ b/examples/models/phi-3-mini/CMakeLists.txt @@ -21,14 +21,14 @@ add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/../../.. ${CMAKE_BINARY_DIR}/../../..) add_subdirectory( - ${CMAKE_CURRENT_SOURCE_DIR}/third-party/sentencepiece - ${CMAKE_BINARY_DIR}/third-party/sentencepiece) + ${CMAKE_CURRENT_SOURCE_DIR}/../../../extension/llm/third-party/sentencepiece + ${CMAKE_BINARY_DIR}/sentencepiece) add_executable(phi_3_mini_runner main.cpp) target_include_directories( phi_3_mini_runner PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/third-party/sentencepiece/src) + ${CMAKE_CURRENT_SOURCE_DIR}/../../../extension/llm/third-party/sentencepiece/src) target_link_libraries( phi_3_mini_runner PRIVATE diff --git a/examples/models/phi-3-mini/third-party/sentencepiece b/extension/llm/third-party/sentencepiece similarity index 100% rename from examples/models/phi-3-mini/third-party/sentencepiece rename to extension/llm/third-party/sentencepiece