Skip to content

Commit

Permalink
Use pytorch-labs/tokenizers and remove tokenizer/
Browse files Browse the repository at this point in the history
Summary: Use our shiny new repo
https://github.com/pytorch-labs/tokenizers.

Test Plan: Rely on CI jobs

Reviewers:

Subscribers:

Tasks:

Tags:
  • Loading branch information
larryliu0820 committed Dec 6, 2024
1 parent 29428ef commit 449f0c8
Show file tree
Hide file tree
Showing 17 changed files with 242 additions and 1,545 deletions.
12 changes: 3 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "tokenizer/third-party/abseil-cpp"]
path = tokenizer/third-party/abseil-cpp
url = https://github.com/abseil/abseil-cpp.git
[submodule "tokenizer/third-party/re2"]
path = tokenizer/third-party/re2
url = https://github.com/google/re2.git
[submodule "tokenizer/third-party/sentencepiece"]
path = tokenizer/third-party/sentencepiece
url = https://github.com/google/sentencepiece.git
[submodule "runner/third-party/tokenizers"]
path = runner/third-party/tokenizers
url = https://github.com/pytorch-labs/tokenizers
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@ ELSE()
ENDIF()

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

# include tokenizer
add_subdirectory(tokenizer)
add_subdirectory(runner/third-party/tokenizers)

# include et_run executable
include(runner/et.cmake)
if(TARGET et_run)
target_link_libraries(et_run PUBLIC tokenizer microkernels-prod)
target_link_libraries(et_run PUBLIC tokenizers microkernels-prod)
target_include_directories(et_run PUBLIC runner/third-party/tokenizers/include)
endif()

# include aoti_run executable
include(runner/aoti.cmake)
if(TARGET aoti_run)
target_link_libraries(aoti_run tokenizer)
target_link_libraries(aoti_run tokenizers)
target_include_directories(aoti_run PUBLIC runner/third-party/tokenizers/include)
endif()
Loading

0 comments on commit 449f0c8

Please sign in to comment.