Skip to content

Commit e1fefc0

Browse files
Jack-Khuuvmpuri
authored andcommitted
Revert "Use pytorch-labs/tokenizers and remove tokenizer/ (#1401)" (#1414)
This reverts commit fff956c.
1 parent 2c03a2a commit e1fefc0

File tree

18 files changed

+1547
-244
lines changed

18 files changed

+1547
-244
lines changed

.github/workflows/pull.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ jobs:
942942
path: |
943943
./et-build
944944
./torchchat/utils/scripts
945-
key: et-build-${{runner.os}}-${{runner.arch}}-${{env.et-git-hash}}-${{ hashFiles('**/install_et.sh', '**/build_native.sh') }}
945+
key: et-build-${{runner.os}}-${{runner.arch}}-${{env.et-git-hash}}-${{ hashFiles('**/install_et.sh') }}
946946
- if: ${{ steps.install-et.outputs.cache-hit != 'true' }}
947947
continue-on-error: true
948948
run: |
@@ -1053,7 +1053,7 @@ jobs:
10531053
10541054
# Pull submodules (re2, abseil) for Tiktoken
10551055
git submodule sync
1056-
git submodule update --init --recursive
1056+
git submodule update --init
10571057
./runner/build_android.sh
10581058
echo "Tests complete."
10591059

.gitmodules

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
[submodule "runner/third-party/tokenizers"]
2-
path = runner/third-party/tokenizers
3-
url = https://github.com/pytorch-labs/tokenizers
1+
[submodule "tokenizer/third-party/abseil-cpp"]
2+
path = tokenizer/third-party/abseil-cpp
3+
url = https://github.com/abseil/abseil-cpp.git
4+
[submodule "tokenizer/third-party/re2"]
5+
path = tokenizer/third-party/re2
6+
url = https://github.com/google/re2.git
7+
[submodule "tokenizer/third-party/sentencepiece"]
8+
path = tokenizer/third-party/sentencepiece
9+
url = https://github.com/google/sentencepiece.git

CMakeLists.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@ ELSE()
77
ENDIF()
88

99
project(Torchchat)
10-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
1110

1211
# include tokenizer
13-
add_subdirectory(runner/third-party/tokenizers)
12+
add_subdirectory(tokenizer)
1413

1514
# include et_run executable
1615
include(runner/et.cmake)
1716
if(TARGET et_run)
18-
target_link_libraries(et_run PUBLIC tokenizers microkernels-prod)
19-
target_include_directories(et_run PUBLIC runner/third-party/tokenizers/include)
17+
target_link_libraries(et_run PUBLIC tokenizer microkernels-prod)
2018
endif()
2119

2220
# include aoti_run executable
2321
include(runner/aoti.cmake)
2422
if(TARGET aoti_run)
25-
target_link_libraries(aoti_run tokenizers)
26-
target_include_directories(aoti_run PUBLIC runner/third-party/tokenizers/include)
23+
target_link_libraries(aoti_run tokenizer)
2724
endif()

0 commit comments

Comments
 (0)