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

[TOKENIZERS] added build of tokenizers in wheel #798

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions .ci/azure/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ jobs:
source $(WORK_DIR)/.env3/bin/activate && source $(SETUPVARS)
python -m pip install build
python -m build --wheel --outdir $(BUILD_WHEEL_DIR) $(REPO_DIR)/modules/custom_operations
env:
CMAKE_ARGS: '-DBUILD_FAST_TOKENIZERS=ON',
CMAKE_GENERATOR: 'Unix Makefiles'
workingDirectory: $(WORK_DIR)
displayName: 'Build tokenizers wheel'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ endif()

option(BUILD_FAST_TOKENIZERS OFF)

# to build only direct dependencies
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL ON)

#
# Compile flags
Expand Down Expand Up @@ -168,8 +166,12 @@ set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_OPTIONS "${extra_flags}"
# Post build steps to copy core_tokenizers dependencies
#

set_property(DIRECTORY ${sentencepiece_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL ON)

if(BUILD_FAST_TOKENIZERS)
# TODO
install(TARGETS core_tokenizers
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
ilya-lavrenov marked this conversation as resolved.
Show resolved Hide resolved
else()
if(WIN32 AND X86_64)
set(extra_libs "${fast_tokenizer_SOURCE_DIR}/lib/core_tokenizers.dll"
Expand Down