Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[retry] Use pytorch-labs/tokenizers and remove tokenizer/ (#1401) #1443

Merged
merged 4 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ jobs:
path: |
./et-build
./torchchat/utils/scripts
key: et-build-${{runner.os}}-${{runner.arch}}-${{env.et-git-hash}}-${{ hashFiles('**/install_et.sh') }}
key: et-build-${{runner.os}}-${{runner.arch}}-${{env.et-git-hash}}-${{ hashFiles('**/install_et.sh', '**/build_native.sh') }}
- if: ${{ steps.install-et.outputs.cache-hit != 'true' }}
continue-on-error: true
run: |
Expand Down Expand Up @@ -1033,7 +1033,7 @@ jobs:

# Pull submodules (re2, abseil) for Tiktoken
git submodule sync
git submodule update --init
git submodule update --init --recursive
./runner/build_android.sh
echo "Tests complete."

Expand Down
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
Loading