Skip to content

[not for commit] Tosa ser fix on 0.5 #7690

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

Closed
wants to merge 2 commits into from
Closed
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
11 changes: 4 additions & 7 deletions .ci/docker/requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
mpmath==1.3.0
numpy==1.21.3; python_version == '3.10'
numpy==1.23.2; python_version == '3.11'
numpy; python_version >= '3.12'
numpy==2.0.0; python_version >= '3.10'
PyYAML==6.0.1
ruamel.yaml==0.17.32
sympy==1.12
timm==0.6.13
tomli==2.0.1
torchsr==1.0.4
transformers==4.38.0
transformers==4.47.1
zstd==1.5.5.1
pandas==2.0.3; python_version == '3.10'
pandas; python_version >= '3.11'
pandas==2.2.2; python_version >= '3.10'
pytest==7.2.0
pytest-cov==4.1.0
expecttest==0.1.6
Expand All @@ -24,7 +21,7 @@ sphinx-gallery==0.14.0
breathe==4.34.0
exhale==0.2.3
docutils==0.16
matplotlib==3.7.2
matplotlib==3.9.4
# PyTorch Theme
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
myst-parser==0.18.1
Expand Down
6 changes: 1 addition & 5 deletions backends/apple/coreml/scripts/install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ cmake --build "$COREMLTOOLS_DIR_PATH/build" --parallel

echo "${green}ExecuTorch: Installing coremltools."
pip install "$COREMLTOOLS_DIR_PATH"
# CoreMLTools have started supporting numpy 2.0,
# but ExecuTorch example model test env is still using older transformers,
# so for now we will need to downgrade numpy to 1.x
# TODO: Remove this numpy downgrade once later transformers starts to be used
pip install numpy==1.26.4

STATUS=$?
if [ $STATUS -ne 0 ]; then
echo "${red}ExecuTorch: Failed to install coremltools."
Expand Down
2 changes: 1 addition & 1 deletion backends/arm/third-party/serialization_lib
Submodule serialization_lib updated 65 files
+3 −1 .gitignore
+3 −3 .pre-commit-config.yaml
+55 −18 CMakeLists.txt
+144 −49 README.md
+21 −43 include/attribute.def
+985 −0 include/cfloat.h
+35 −0 include/cfloat_forward.h
+283 −0 include/cmicroscaling.h
+17 −0 include/numpy_utils.h
+106 −0 include/op.def
+62 −0 include/op.h
+271 −579 include/tosa_generated.h
+371 −0 include/tosa_schema.h
+58 −52 include/tosa_serialization_handler.h
+6 −0 pyproject.toml
+0 −0 python/pytests/__init__.py
+75 −0 python/pytests/conftest.py
+233 −0 python/pytests/examples/test_conv2d_256x256x3_f32.json
+86 −0 python/pytests/examples/test_select_2048x2048x3_i8.json
+116 −0 python/pytests/test_example.py
+225 −0 python/pytests/test_single_attr.py
+104 −0 python/pytests/test_single_op.py
+307 −0 python/pytests/test_single_tensor.py
+2 −1 python/serializer/__init__.py
+153 −152 python/serializer/tosa_serializer.py
+16 −18 python/tosa/Attribute.py
+30 −56 python/tosa/ClampAttribute.py
+10 −10 python/tosa/CondIfAttribute.py
+17 −4 python/tosa/ConvAttribute.py
+1 −1 python/tosa/CustomAttribute.py
+2 −0 python/tosa/DType.py
+0 −26 python/tosa/FullyConnectedAttribute.py
+10 −0 python/tosa/Op.py
+14 −66 python/tosa/PadAttribute.py
+8 −8 python/tosa/PoolAttribute.py
+54 −0 python/tosa/RandUniformAttribute.py
+11 −89 python/tosa/RescaleAttribute.py
+0 −80 python/tosa/ReshapeAttribute.py
+0 −117 python/tosa/ResizeAttribute.py
+0 −119 python/tosa/SliceAttribute.py
+0 −39 python/tosa/TableAttribute.py
+0 −80 python/tosa/TileAttribute.py
+4 −4 python/tosa/TosaBasicBlock.py
+1 −1 python/tosa/TosaGraph.py
+2 −2 python/tosa/TosaOperator.py
+1 −1 python/tosa/TosaRegion.py
+2 −2 python/tosa/TosaTensor.py
+1 −1 python/tosa/TransposeAttribute.py
+20 −46 python/tosa/TransposeConvAttribute.py
+10 −10 python/tosa/WhileLoopAttribute.py
+0 −1 regenerate_headers.sh
+55 −0 schema/convert_schema_to_header.py
+38 −42 schema/tosa.fbs
+42 −14 src/numpy_utils.cpp
+271 −78 src/tosa_serialization_handler.cpp
+ test/examples/test_add_1x4x4x4_f32.tosa
+37 −0 test/gtests/CMakeLists.txt
+98 −0 test/gtests/test_serialization_npy.cpp
+43 −0 test/gtests/test_serialization_read_write.cpp
+186 −0 test/gtests/test_serialization_unit.cpp
+204 −0 test/gtests/test_serialization_utils.h
+73 −0 test/gtests/test_single_attr.cpp
+135 −0 test/gtests/test_u8_conversion.cpp
+7 −13 test/src/serialization_npy_test.cpp
+1 −1 third_party/flatbuffers
2 changes: 0 additions & 2 deletions examples/models/llama/install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ pip install "$(dirname "$0")/../../../third-party/ao"
# Install tiktoken for tokenizer
pip install lm_eval==0.4.5
pip install tiktoken blobfile
# Restore numpy if >= 2.0
pip install "numpy<2.0"

# Call the install helper for further setup
python examples/models/llama/install_requirement_helper.py
2 changes: 1 addition & 1 deletion install_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def python_is_compatible():
"timm==1.0.7",
"torchaudio==2.6.0" if USE_PYTORCH_NIGHTLY else "torchaudio",
"torchsr==1.0.4",
"transformers==4.46.1",
"transformers==4.47.1",
]

# pip packages needed for development.
Expand Down
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,9 @@ dependencies=[
"flatbuffers",
"hypothesis",
"mpmath==1.3.0",
"numpy==1.21.3; python_version == '3.10'",
"numpy==1.23.2; python_version == '3.11'",
"numpy; python_version >= '3.12'",
"numpy==2.0.0; python_version >= '3.10'",
"packaging",
"pandas==2.0.3; python_version == '3.10'",
"pandas; python_version >= '3.11'",
"pandas==2.2.2; python_version >= '3.10'",
"parameterized",
"pytest",
"pytest-xdist",
Expand Down
2 changes: 1 addition & 1 deletion third-party/pybind11
Submodule pybind11 updated 189 files
Loading