Skip to content

Commit f78320d

Browse files
committed
Update
[ghstack-poisoned]
2 parents bbf612c + 1572381 commit f78320d

File tree

218 files changed

+4427
-133234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+4427
-133234
lines changed

.ci/scripts/test_llama.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ $PYTHON_EXECUTABLE -m examples.models.llama.export_llama ${EXPORT_ARGS}
269269

270270
# Create tokenizer.bin.
271271
echo "Creating tokenizer.bin"
272-
$PYTHON_EXECUTABLE -m extension.llm.tokenizer.tokenizer -t tokenizer.model -o tokenizer.bin
272+
$PYTHON_EXECUTABLE -m pytorch_tokenizers.tools.llama2c.convert -t tokenizer.model -o tokenizer.bin
273273

274274

275275
RUNTIME_ARGS="--model_path=${EXPORTED_MODEL_NAME} --tokenizer_path=tokenizer.bin --prompt=Once --temperature=0 --seq_len=10 --warmup=1"

.ci/scripts/test_llama_torchao_lowbit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ cmake --build cmake-out/examples/models/llama -j16 --config Release
5555
download_stories_model_artifacts
5656

5757
echo "Creating tokenizer.bin"
58-
$PYTHON_EXECUTABLE -m extension.llm.tokenizer.tokenizer -t tokenizer.model -o tokenizer.bin
58+
$PYTHON_EXECUTABLE -m pytorch_tokenizers.tools.llama2c.convert -t tokenizer.model -o tokenizer.bin
5959

6060
# Export model
6161
LLAMA_CHECKPOINT=stories110M.pt

.ci/scripts/test_phi_3_mini.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ cmake_build_phi_3_mini() {
5656
prepare_tokenizer() {
5757
echo "Downloading and converting tokenizer.model"
5858
wget -O tokenizer.model "https://huggingface.co/microsoft/Phi-3-mini-128k-instruct/resolve/main/tokenizer.model?download=true"
59-
$PYTHON_EXECUTABLE -m executorch.extension.llm.tokenizer.tokenizer -t tokenizer.model -o tokenizer.bin
59+
$PYTHON_EXECUTABLE -m pytorch_tokenizers.tools.llama2c.convert -t tokenizer.model -o tokenizer.bin
6060
}
6161

6262
# Export phi-3-mini model to pte

.ci/scripts/test_qnn_static_llama.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This source code is licensed under the BSD-style license found in the
66
# LICENSE file in the root directory of this source tree.
77

8-
set -exu
8+
set -euxo pipefail
99

1010
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1111

@@ -30,7 +30,7 @@ pip install graphviz
3030
# Download stories llama110m artifacts
3131
download_stories_model_artifacts
3232
echo "Creating tokenizer.bin"
33-
$PYTHON_EXECUTABLE -m extension.llm.tokenizer.tokenizer -t tokenizer.model -o tokenizer.bin
33+
$PYTHON_EXECUTABLE -m pytorch_tokenizers.tools.llama2c.convert -t tokenizer.model -o tokenizer.bin
3434

3535
set +e
3636
# Compile only as weight sharing is not applicable on x86
@@ -56,4 +56,3 @@ if [ $exit_code1 -ne 0 ] || [ $exit_code2 -ne 0 ]; then
5656
else
5757
exit 0
5858
fi
59-
set -e

.ci/scripts/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ install_executorch() {
3232
which pip
3333
# Install executorch, this assumes that Executorch is checked out in the
3434
# current directory.
35-
./install_executorch.sh --pybind xnnpack "$@"
35+
./install_executorch.sh "$@"
3636
# Just print out the list of packages for debugging
3737
pip list
3838
}

.github/scripts/extract_benchmark_results.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ def transform(
360360
"app_type": app_type,
361361
# Just keep a copy of the benchmark config here
362362
"benchmark_config": json.dumps(benchmark_config),
363+
"job_conclusion": "SUCCESS",
363364
},
364365
},
365366
"model": {
@@ -455,7 +456,7 @@ def transform_failure_record(
455456
},
456457
"metric": {
457458
"name": "FAILURE_REPORT",
458-
"benchmark_values": 0,
459+
"benchmark_values": [0],
459460
"target_value": 0,
460461
"extra_info": {
461462
"method": "",

.github/workflows/apple.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
id: set_version
3838
shell: bash
3939
run: |
40-
VERSION="0.5.0.$(TZ='PST8PDT' date +%Y%m%d)"
40+
VERSION="0.7.0.$(TZ='PST8PDT' date +%Y%m%d)"
4141
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
4242
4343
build-demo-ios:

.github/workflows/pull.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ jobs:
573573
574574
BUILD_TOOL="cmake"
575575
576-
./install_requirements.sh --use-pt-pinned-commit
577576
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
578577
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
579578

CMakeLists.txt

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -757,17 +757,13 @@ if(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR)
757757
endif()
758758

759759
if(EXECUTORCH_BUILD_EXTENSION_LLM)
760-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/llm/tokenizer)
760+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/llm/tokenizers)
761761
endif()
762762

763763
if(EXECUTORCH_BUILD_EXTENSION_MODULE)
764764
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/module)
765765
endif()
766766

767-
if(EXECUTORCH_BUILD_EXTENSION_TRAINING)
768-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/training)
769-
endif()
770-
771767
if(EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL)
772768
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/runner_util)
773769
endif()
@@ -872,34 +868,13 @@ if(EXECUTORCH_BUILD_PYBIND)
872868

873869
if(EXECUTORCH_BUILD_EXTENSION_TRAINING)
874870

875-
set(_pybind_training_dep_libs
876-
${TORCH_PYTHON_LIBRARY}
877-
etdump
878-
executorch
879-
util
880-
torch
881-
extension_training
882-
)
883-
884-
if(EXECUTORCH_BUILD_XNNPACK)
885-
# need to explicitly specify XNNPACK and microkernels-prod
886-
# here otherwise uses XNNPACK and microkernel-prod symbols from libtorch_cpu
887-
list(APPEND _pybind_training_dep_libs xnnpack_backend XNNPACK microkernels-prod)
888-
endif()
889-
890-
# pybind training
891-
pybind11_add_module(_training_lib SHARED extension/training/pybindings/_training_lib.cpp)
892-
893-
target_include_directories(_training_lib PRIVATE ${TORCH_INCLUDE_DIRS})
894-
target_compile_options(_training_lib PUBLIC ${_pybind_compile_options})
895-
target_link_libraries(_training_lib PRIVATE ${_pybind_training_dep_libs})
896-
897-
install(TARGETS _training_lib
898-
LIBRARY DESTINATION executorch/extension/training/pybindings
899-
)
900871
endif()
901872
endif()
902873

874+
if(EXECUTORCH_BUILD_EXTENSION_TRAINING)
875+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/training)
876+
endif()
877+
903878
if(EXECUTORCH_BUILD_KERNELS_CUSTOM)
904879
# TODO: move all custom kernels to ${CMAKE_CURRENT_SOURCE_DIR}/kernels/custom
905880
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/llm/custom_ops)

backends/apple/coreml/scripts/install_requirements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ SCRIPT_DIR_PATH="$(
1212

1313
# TODO(jathu): remove the need to fetch coremltools to build deps for coreml_executor_runner.
1414
# Keep this version in sync with: pyproject.toml
15-
COREMLTOOLS_VERSION="8.1"
15+
COREMLTOOLS_VERSION="8.2"
1616

1717
red=`tput setaf 1`
1818
green=`tput setaf 2`

0 commit comments

Comments
 (0)