Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
69a3c83
[WIP] Upgrade Protobuf to v21.1 to accept Python Protobuf 4.21
jcwchen Mar 2, 2023
45926a6
Merge remote-tracking branch 'upstream/main' into jcw/protobuf4.21
jcwchen Mar 2, 2023
8c40bfc
then
jcwchen Mar 2, 2023
f55786b
Same as previous PR
jcwchen Mar 2, 2023
d65d055
fix CIs
jcwchen Mar 2, 2023
f4e5d55
3.21.12
jcwchen Mar 2, 2023
11d32da
build protobuf from source on Linux
jcwchen Mar 2, 2023
aadcec9
static protobuf
jcwchen Mar 2, 2023
2eb2a39
protoc --version
jcwchen Mar 3, 2023
3b8bffc
$BUILD_TYPE
jcwchen Mar 3, 2023
cb1d3fa
printenv PATH
jcwchen Mar 3, 2023
d7e49be
path
jcwchen Mar 3, 2023
f1d03c4
onnx-protobufv21
jcwchen Mar 5, 2023
8debe39
test 3.20.2
jcwchen Mar 6, 2023
177615c
Protobuf 4 and Protobuf 3 will output different order of protobuf fie…
jcwchen Mar 6, 2023
bc0b1db
skip
jcwchen Mar 6, 2023
3395540
%%script --no-raise-error false
jcwchen Mar 6, 2023
8c51e6a
updated
jcwchen Mar 6, 2023
1cca6ee
test lower protoc
jcwchen Mar 23, 2023
862333a
export CMAKE_ARGS="-DONNX_WERROR=ON -DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
jcwchen Mar 23, 2023
ee8600c
fix
jcwchen Mar 23, 2023
4907b60
still test protobuf==3.20.2 at least in a CI
jcwchen Mar 23, 2023
cd2f594
Merge branch 'main' into jcw/protobuf4.21
jcwchen Mar 24, 2023
08f8f08
Merge branch 'main' into jcw/protobuf4.21
jcwchen Mar 29, 2023
648b23f
update Protobufs.ipynb
jcwchen Mar 29, 2023
dcbfbdc
Merge branch 'main' into jcw/protobuf4.21
jcwchen Apr 3, 2023
1508790
Merge branch 'main' into jcw/protobuf4.21
jcwchen Apr 4, 2023
c5441c0
["nbreg"] = {"skip": True, "skip_reason": "Not ready for testing."}
jcwchen Apr 4, 2023
53856bf
NBVAL_SKIP
jcwchen Apr 4, 2023
af14ee5
Merge branch 'main' into jcw/protobuf4.21
jcwchen Apr 4, 2023
a0a6c0f
use " instead of '
jcwchen Apr 4, 2023
edef005
Merge branch 'jcw/protobuf4.21' of https://github.com/jcwchen/onnx in…
jcwchen Apr 4, 2023
88e2048
Merge branch 'main' into jcw/protobuf4.21
jcwchen Apr 4, 2023
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
15 changes: 8 additions & 7 deletions .azure-pipelines/Linux-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ jobs:
py39-ml-debug:
python.version: '3.9'
onnx_ml: 1
onnx_debug: 1
build_type: 'Debug'
documentation: 0
py38:
python.version: '3.8'
onnx_ml: 0
onnx_debug: 0
build_type: 'Release'
documentation: 0
py38-ml:
python.version: '3.8'
onnx_ml: 1
onnx_debug: 0
build_type: 'Release'
documentation: 1
py37:
python.version: '3.7'
onnx_ml: 0
onnx_debug: 0
build_type: 'Release'
documentation: 0
py37-ml:
python.version: '3.7'
onnx_ml: 1
onnx_debug: 0
build_type: 'Release'
documentation: 0
maxParallel: 6

Expand All @@ -48,19 +48,20 @@ jobs:
sudo apt-get install libprotobuf-dev protobuf-compiler
python -m pip install -q --upgrade pip
python -m pip install -q -r requirements-release.txt
# still test protobuf==3.20.2 at least in a CI
python -m pip install protobuf==3.20.2

sudo apt-get install -qq -o=Dpkg::Use-Pty=0 -y --no-install-recommends dos2unix

git submodule update --init --recursive
export ONNX_BUILD_TESTS=1
if [ '$(onnx_debug)' == '1' ]; then
if [ '$(build_type)' == 'Debug' ]; then
export DEBUG=1
fi
if [ '$(onnx_ml)' == '1' ]; then
export ONNX_ML=1
fi
export CMAKE_ARGS="-DONNX_WERROR=ON -DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
export ONNX_NAMESPACE=ONNX_NAMESPACE_FOO_BAR_FOR_CI
# enable more sanitizer
export CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_CXX_FLAGS='-fsanitize=undefined -fno-sanitize-recover=all '"
python setup.py install
Expand Down
17 changes: 7 additions & 10 deletions .azure-pipelines/MacOS-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ jobs:
py39:
python.version: '3.9'
onnx_ml: 0
onnx_debug: 0
build_type: 'Release'
onnx_lite: 0
py38:
python.version: '3.8'
onnx_ml: 0
onnx_debug: 0
build_type: 'Release'
onnx_lite: 1
py38-ml:
python.version: '3.8'
onnx_ml: 1
onnx_debug: 0
build_type: 'Release'
onnx_lite: 1
py38-ml-debug:
python.version: '3.8'
onnx_ml: 1
onnx_debug: 1
build_type: 'Debug'
onnx_lite: 0
py37-ml-debug:
python.version: '3.7'
onnx_ml: 1
onnx_debug: 1
build_type: 'Debug'
onnx_lite: 0
maxParallel: 6

Expand All @@ -42,12 +42,10 @@ jobs:
- script: |
# Install Protobuf from source
export NUM_CORES=`sysctl -n hw.logicalcpu`
if [ '$(onnx_debug)' == '1' ]; then
if [ '$(build_type)' == 'Debug' ]; then
export DEBUG=1
source workflow_scripts/protobuf/build_protobuf_unix.sh $NUM_CORES $(pwd)/protobuf/protobuf_install Debug
else
source workflow_scripts/protobuf/build_protobuf_unix.sh $NUM_CORES $(pwd)/protobuf/protobuf_install
fi
source workflow_scripts/protobuf/build_protobuf_unix.sh $NUM_CORES $(pwd)/protobuf/protobuf_install $(build_type)

git submodule update --init --recursive
python -m pip install -q --upgrade pip
Expand All @@ -61,7 +59,6 @@ jobs:
if [ '$(onnx_lite)' == '1' ]; then
export CMAKE_ARGS="${CMAKE_ARGS} -DONNX_USE_LITE_PROTO=ON"
fi
export ONNX_NAMESPACE=ONNX_NAMESPACE_FOO_BAR_FOR_CI
python setup.py install
displayName: 'Install dependencies and ONNX'

Expand Down
13 changes: 12 additions & 1 deletion .azure-pipelines/Windows-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- script: |
conda create --yes --quiet --name py$(python.version) python=$(python.version)
conda install -n py$(python.version) -y -c conda-forge numpy libprotobuf=3.20
conda install -n py$(python.version) -y -c conda-forge numpy libprotobuf==3.21.5
displayName: Create Anaconda environment

- script: |
Expand Down Expand Up @@ -86,6 +86,16 @@ jobs:

rm -rf .setuptools-cmake-build


conda remove libprotobuf
conda install libprotobuf=3.20
python -m pip install protobuf==3.20.2
pytest
IF NOT %ERRORLEVEL% EQU 0 (
@echo "pytest failed when testing onnx with libprotobuf=3.20"
EXIT 1
)

python -m pip install -q onnxruntime
set ORT_MAX_IR_SUPPORTED_VERSION=8
set ORT_MAX_ML_OPSET_SUPPORTED_VERSION=3
Expand All @@ -97,3 +107,4 @@ jobs:
)

displayName: Install and test ONNX

Loading