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

Revert Windows GPU python 3.8 and python 3.9 changes in the release branch #6035

Merged
merged 7 commits into from
Dec 9, 2020
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
14 changes: 7 additions & 7 deletions cgmanifests/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "bc8ce45b35ade9b8f08d88d4d9fdfd12b4f6f310",
"commitHash": "f97fd8664fa824e5d081d776cf4a811dbf09bca4",
"repositoryUrl": "https://github.com/pypa/manylinux"
},
"comments": "For building our CI build docker image"
Expand All @@ -363,20 +363,20 @@
"component": {
"type": "git",
"git": {
"commitHash": "9cf6752276e6fcfd0c23fdb064ad27f448aaaf75",
"commitHash": "439c93d51f45c50541fc755b597725168ecd939a",
"repositoryUrl": "https://github.com/python/cpython"
},
"comments": "Python 3.9.0"
"comments": "Python 3.9.0rc1"
}
},
{
"component": {
"type": "git",
"git": {
"commitHash": "db455296be5f792b8c12b7cd7f3962b52e4f44ee",
"commitHash": "580fbb018fd0844806119614d752b41fc69660f9",
"repositoryUrl": "https://github.com/python/cpython"
},
"comments": "Python 3.8.6"
"comments": "Python 3.8.5"
}
},
{
Expand All @@ -403,10 +403,10 @@
"component": {
"type": "git",
"git": {
"commitHash": "426b022776672fdf3d71ddd98d89af341c88080f",
"commitHash": "e5f6aba872e66bfd86eb592214696a519cded197",
"repositoryUrl": "https://github.com/python/cpython"
},
"comments": "Python 3.5.10"
"comments": "Python 3.5.9"
}
},
{
Expand Down
20 changes: 5 additions & 15 deletions cgmanifests/submodules/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"Type": "other",
"other": {
"Name": "sqlite",
"Version": "3330000",
"DownloadUrl": "https://www.sqlite.org/2020/sqlite-autoconf-3330000.tar.gz"
"Version": "3320300",
"DownloadUrl": "https://www.sqlite.org/2020/sqlite-autoconf-3320300.tar.gz"
},
"comments": "manylinux dependency"
}
Expand All @@ -39,8 +39,8 @@
"Type": "other",
"other": {
"Name": "git",
"Version": "2.29.1",
"DownloadUrl": "https://www.kernel.org/pub/software/scm/git/git-2.29.1.tar.gz"
"Version": "2.26.2",
"DownloadUrl": "https://github.com/git/git/archive/2.26.2.tar.gz"
},
"comments": "manylinux dependency"
}
Expand Down Expand Up @@ -409,22 +409,12 @@
"component": {
"type": "git",
"git": {
"commitHash": "80d452484c5409444b0ec19383faa84bb7a4d351",
"commitHash": "59a2ac2745d8a57ac94c6accced73620d59fb844",
"repositoryUrl": "https://github.com/pybind/pybind11.git"
},
"comments": "git submodule at cmake/external/onnx/third_party/pybind11"
}
},
{
"component": {
"type": "git",
"git": {
"commitHash": "6a00cbc4a9b8e68b71caf7f774b3f9c753ae84d5",
"repositoryUrl": "https://github.com/wjakob/clang-cindex-python3"
},
"comments": "git submodule at cmake/external/onnx/third_party/pybind11/tools/clang"
}
},
{
"component": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions cmake/external/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if(NOT TARGET pybind11::module)

set(pybind11_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/pybind11/src/pybind11/include)
set(pybind11_URL https://github.com/pybind/pybind11.git)
set(pybind11_TAG v2.6.1)
set(pybind11_TAG v2.4.0)

ExternalProject_Add(pybind11
PREFIX pybind11
Expand All @@ -21,4 +21,4 @@ if(NOT TARGET pybind11::module)
set(pybind11_dep pybind11)
else()
set(pybind11_lib pybind11::module)
endif()
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ docker run --gpus all --rm \
-e "PackageName=$PackageName" \
-e "RunTestCsharp=$RunTestCsharp" \
-e "RunTestNative=$RunTestNative" \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentosgpubuild:cht \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimegpubuild:ch14 \
/bin/bash /onnxruntime_src/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest.sh \
/home/onnxruntimedev/$NUGET_REPO_DIRNAME /onnxruntime_src /home/onnxruntimedev $CurrentOnnxRuntimeVersion
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ docker run --rm \
-e "DisableMlOps=$DISABLEMLOPS" \
-e "RunTestCsharp=$RunTestCsharp" \
-e "RunTestNative=$RunTestNative" \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:chr \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:ch15 \
/bin/bash /onnxruntime_src/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests/runtest.sh \
/home/onnxruntimedev/$NUGET_REPO_DIRNAME /onnxruntime_src /home/onnxruntimedev $CurrentOnnxRuntimeVersion
18 changes: 2 additions & 16 deletions onnxruntime/python/_pybind_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,9 @@

import os
import platform
import sys
import warnings
import onnxruntime.capi._ld_preload # noqa: F401

# Python 3.8 (and later) on Windows doesn't search system PATH when loading DLLs,
# so CUDA location needs to be specified explicitly.
if platform.system() == "Windows" and sys.version_info >= (3, 8):
CUDA_VERSION = "10.2"
CUDNN_VERSION = "8"
cuda_env_variable = "CUDA_PATH_V" + CUDA_VERSION.replace(".", "_")
if cuda_env_variable not in os.environ:
raise ImportError("CUDA Toolkit %s not installed on the machine." % CUDA_VERSION)
cuda_bin_dir = os.path.join(os.environ[cuda_env_variable], "bin")
if not os.path.isfile(os.path.join(cuda_bin_dir, "cudnn64_%s.dll" % CUDNN_VERSION)):
raise ImportError("cuDNN %s not installed on the machine." % CUDNN_VERSION)
os.add_dll_directory(cuda_bin_dir)

try:
from onnxruntime.capi.onnxruntime_pybind11_state import * # noqa
except ImportError as e:
Expand All @@ -35,6 +21,6 @@
# TODO: Add a guard against False Positive error message
# As a proxy for checking if the 2019 VC Runtime is installed,
# we look for a specific dll only shipped with the 2019 VC Runtime
if platform.system() == "Windows" and not os.path.isfile("C:\\Windows\\System32\\vcruntime140_1.dll"):
if platform.system().lower() == 'windows' and not os.path.isfile('c:\\Windows\\System32\\vcruntime140_1.dll'):
warnings.warn("Unless you have built the wheel using VS 2017, "
"please install the 2019 Visual C++ runtime and then try again.")
"please install the 2019 Visual C++ runtime and then try again")
20 changes: 14 additions & 6 deletions onnxruntime/test/python/onnxruntime_test_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import threading
import sys
from helper import get_name
from onnxruntime.capi.onnxruntime_pybind11_state import Fail

class TestInferenceSession(unittest.TestCase):

Expand All @@ -20,12 +21,19 @@ def run_model(self, session_object, run_options):
np.testing.assert_allclose(output_expected, res[0], rtol=1e-05, atol=1e-08)

def testModelSerialization(self):
so = onnxrt.SessionOptions()
so.log_verbosity_level = 1
so.logid = "TestModelSerialization"
so.optimized_model_filepath = "./PythonApiTestOptimizedModel.onnx"
onnxrt.InferenceSession(get_name("mul_1.onnx"), sess_options=so)
self.assertTrue(os.path.isfile(so.optimized_model_filepath))
try:
so = onnxrt.SessionOptions()
so.log_verbosity_level = 1
so.logid = "TestModelSerialization"
so.optimized_model_filepath = "./PythonApiTestOptimizedModel.onnx"
onnxrt.InferenceSession(get_name("mul_1.onnx"), sess_options=so)
self.assertTrue(os.path.isfile(so.optimized_model_filepath))
except Fail as onnxruntime_error:
if str(onnxruntime_error) == "[ONNXRuntimeError] : 1 : FAIL : Unable to serialize model as it contains" \
" compiled nodes. Please disable any execution providers which generate compiled nodes.":
pass
else:
raise onnxruntime_error

def testGetProviders(self):
self.assertTrue('CPUExecutionProvider' in onnxrt.get_available_providers())
Expand Down
2 changes: 1 addition & 1 deletion tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ def run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs):

# Disable python tests in a reduced build as we don't know which ops have been included and which
# models can run
if args.include_ops_by_model or args.include_ops_by_config or args.minimal_build:
if args.include_ops_by_model or args.include_ops_by_config or args.minimal_build != 'off':
return

if is_windows():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
script: |
mkdir -p $HOME/.onnx
docker run --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build --volume /data/models:/build/models:ro \
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:chr python3 \
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:ch15 python3 \
/onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release \
--skip_submodule_sync --parallel --build_shared_lib --use_openmp
workingDirectory: $(Build.SourcesDirectory)
Expand Down Expand Up @@ -58,8 +58,8 @@ jobs:
script: |
mkdir -p $HOME/.onnx
docker run --gpus all -e NVIDIA_VISIBLE_DEVICES=all --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build \
--volume /data/models:/build/models:ro --volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentosgpubuild:cht \
python3 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release \
--volume /data/models:/build/models:ro --volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimegpubuild:ch14 \
/opt/python/cp37-cp37m/bin/python3 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release \
--skip_submodule_sync --parallel --build_shared_lib --use_cuda --cuda_version=10.2 --cuda_home=/usr/local/cuda-10.2 --cudnn_home=/usr/local/cuda-10.2
workingDirectory: $(Build.SourcesDirectory)
- task: Docker@2
Expand Down Expand Up @@ -102,6 +102,8 @@ jobs:
export CMAKE_ARGS="-DONNX_GEN_PB_TYPE_STUBS=OFF -DONNX_WERROR=OFF"
sudo python3 -m pip install -r '$(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/requirements.txt'
sudo xcode-select --switch /Applications/Xcode_10.app/Contents/Developer
# The following line is a hack to prevent build pipeline from failing
brew uninstall [email protected]
brew install libomp
python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --use_openmp --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --build_shared_lib --config Release
displayName: 'Build and Test MacOS'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
inputs:
script: |
mkdir -p $HOME/.onnx
docker run --gpus all -e NVIDIA_VISIBLE_DEVICES=all --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build --volume /data/models:/build/models:ro --volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentosgpubuild:cht python3 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release --skip_submodule_sync --parallel --build_java --build_shared_lib --use_cuda --cuda_version=10.2 --cuda_home=/usr/local/cuda-10.2 --cudnn_home=/usr/local/cuda-10.2
docker run --gpus all -e NVIDIA_VISIBLE_DEVICES=all --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build --volume /data/models:/build/models:ro --volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimegpubuild:ch14 /opt/python/cp37-cp37m/bin/python3 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release --skip_submodule_sync --parallel --build_java --build_shared_lib --use_cuda --cuda_version=10.2 --cuda_home=/usr/local/cuda-10.2 --cudnn_home=/usr/local/cuda-10.2
workingDirectory: $(Build.SourcesDirectory)
- task: Docker@2
displayName: logout
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
- task: CmdLine@2
inputs:
script: |
docker run --gpus all -e NVIDIA_VISIBLE_DEVICES=all --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build -e NIGHTLY_BUILD onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentosgpubuild:cht /onnxruntime_src/tools/ci_build/github/linux/java_linux_final_test.sh -v $(OnnxRuntimeVersion) -r /build
docker run --gpus all -e NVIDIA_VISIBLE_DEVICES=all --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build -e NIGHTLY_BUILD onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimegpubuild:ch14 /onnxruntime_src/tools/ci_build/github/linux/java_linux_final_test.sh -v $(OnnxRuntimeVersion) -r /build
workingDirectory: $(Build.BinariesDirectory)/final-jar

- task: Docker@2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
inputs:
script: |
mkdir -p $HOME/.onnx
docker run --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build --volume /data/models:/build/models:ro --volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:chr /bin/bash -c "python3 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release --skip_submodule_sync --parallel --build_shared_lib --build_java --use_openmp --enable_onnx_tests && cd /build/Release && make install DESTDIR=/build/linux-x64"
docker run --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build --volume /data/models:/build/models:ro --volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:ch15 /bin/bash -c "python3 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release --skip_submodule_sync --parallel --build_shared_lib --build_java --use_openmp --enable_onnx_tests && cd /build/Release && make install DESTDIR=/build/linux-x64"
workingDirectory: $(Build.SourcesDirectory)
displayName: 'Run build and test'
- task: Docker@2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
-e ALLOW_RELEASED_ONNX_OPSET_ONLY=0 \
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:chr \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:ch15 \
python3 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build --cmake_generator Ninja \
--config Debug Release \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
-e ALLOW_RELEASED_ONNX_OPSET_ONLY=1 \
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:chr \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:ch15 \
/bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_full_ort_and_create_ort_files.sh
workingDirectory: $(Build.SourcesDirectory)
- task: CmdLine@2
Expand All @@ -54,7 +54,7 @@ jobs:
-e ALLOW_RELEASED_ONNX_OPSET_ONLY=1 \
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:chr \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:ch15 \
python3 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build --cmake_generator Ninja \
--config Debug\
Expand All @@ -76,7 +76,7 @@ jobs:
-e ALLOW_RELEASED_ONNX_OPSET_ONLY=1 \
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:chr \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:ch15 \
/bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_minimal_ort_and_run_tests.sh
workingDirectory: $(Build.SourcesDirectory)
- task: CmdLine@2
Expand All @@ -97,7 +97,7 @@ jobs:
-e BUILD_ID=$(Build.BuildId) \
-e BUILD_REASON=$(Build.Reason) \
-e DASHBOARD_MYSQL_ORT_PASSWORD=$(dashboard-mysql-ort-password) \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:chr \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:ch15 \
/bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_minimal_ort_android_baseline_and_report_bin_size.sh
workingDirectory: $(Build.SourcesDirectory)
- task: Docker@2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx \
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecpubuild:chp \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecpubuild:ch13 \
/opt/python/cp37-cp37m/bin/python3 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build \
--config Debug Release \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
-e ALLOW_RELEASED_ONNX_OPSET_ONLY=0 \
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimegpubuild:chq \
/opt/python/cp37-cp37m/bin/python /onnxruntime_src/tools/ci_build/build.py \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimegpubuild:ch14 \
/opt/python/cp37-cp37m/bin/python3 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build --cmake_generator Ninja \
--config Release \
--skip_submodule_sync \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
-e ALLOW_RELEASED_ONNX_OPSET_ONLY=0 \
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecuda11build:chs \
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecuda11build:ch16 \
/opt/python/cp37-cp37m/bin/python3 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build --cmake_generator Ninja \
--config Debug Release \
Expand Down
Loading