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

Add python 3.13 support #22380

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2a6cee1
update
snnn Oct 9, 2024
eafde93
Merge remote-tracking branch 'origin/main' into snnn/fix_p1
snnn Oct 9, 2024
48e3e56
update
snnn Oct 9, 2024
f91109f
update
snnn Oct 9, 2024
e16e15c
a
snnn Oct 10, 2024
2e1bd85
Merge remote-tracking branch 'origin/main' into snnn/py313
snnn Oct 10, 2024
5156ecc
revert
snnn Oct 10, 2024
1c0797a
update
snnn Oct 10, 2024
bf585a1
update
snnn Oct 10, 2024
3bff877
update
snnn Oct 10, 2024
f5040e8
Merge remote-tracking branch 'origin/main' into snnn/py313
snnn Oct 10, 2024
cd4ed8c
update
snnn Oct 10, 2024
6a379d3
update
snnn Oct 10, 2024
db67ef1
revert
snnn Oct 10, 2024
d7c8cae
Merge remote-tracking branch 'origin/main' into snnn/py313
snnn Oct 10, 2024
653aaf7
update
snnn Oct 10, 2024
5705319
update
snnn Oct 10, 2024
da15f9e
update
snnn Oct 11, 2024
a4096a3
update
snnn Oct 11, 2024
41167cf
update
snnn Oct 11, 2024
237573f
update
snnn Oct 11, 2024
fddc22b
Merge remote-tracking branch 'origin/main' into snnn/py313
snnn Oct 11, 2024
e181dda
update
snnn Oct 11, 2024
33377af
update
snnn Oct 11, 2024
dc6906a
update
snnn Oct 11, 2024
7683b6a
update
snnn Oct 11, 2024
5680865
update
snnn Oct 11, 2024
acdc250
update
snnn Oct 11, 2024
38b966e
update
snnn Oct 11, 2024
ee18bf7
update
snnn Oct 11, 2024
a30a844
update
snnn Oct 11, 2024
84498a9
update
snnn Oct 11, 2024
edbb04e
update
snnn Oct 11, 2024
e408539
update
snnn Oct 11, 2024
a805aee
update
snnn Oct 11, 2024
53e312f
update
snnn Oct 11, 2024
c8426fb
update
snnn Oct 11, 2024
0e0874f
update
snnn Oct 11, 2024
01d4974
update
snnn Oct 11, 2024
3608359
Merge remote-tracking branch 'origin/main' into snnn/py313
snnn Oct 11, 2024
2941239
update
snnn Oct 11, 2024
f009c4f
update
snnn Oct 11, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

set -e
set -x
export PATH=/opt/python/cp38-cp38/bin:$PATH
export PATH=/opt/python/cp312-cp312/bin:$PATH

ls /build
ls /build/deps
Expand Down Expand Up @@ -45,13 +45,13 @@
fi

# Execute the build command
eval $COMMAND

Check warning on line 48 in tools/ci_build/github/android/build_aar_and_copy_artifacts.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/android/build_aar_and_copy_artifacts.sh:48:6: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

# Copy the built artifacts to give folder for publishing
BASE_PATH=/build/aar_out/${BUILD_CONFIG}/com/microsoft/onnxruntime/${PACKAGE_NAME}/${ORT_VERSION}${RELEASE_VERSION_SUFFIX}
cp ${BASE_PATH}/${PACKAGE_NAME}-${ORT_VERSION}${RELEASE_VERSION_SUFFIX}-javadoc.jar /home/onnxruntimedev/.artifacts

Check warning on line 52 in tools/ci_build/github/android/build_aar_and_copy_artifacts.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/android/build_aar_and_copy_artifacts.sh:52:4: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 52 in tools/ci_build/github/android/build_aar_and_copy_artifacts.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/android/build_aar_and_copy_artifacts.sh:52:17: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 52 in tools/ci_build/github/android/build_aar_and_copy_artifacts.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/android/build_aar_and_copy_artifacts.sh:52:33: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 52 in tools/ci_build/github/android/build_aar_and_copy_artifacts.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/android/build_aar_and_copy_artifacts.sh:52:47: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
cp ${BASE_PATH}/${PACKAGE_NAME}-${ORT_VERSION}${RELEASE_VERSION_SUFFIX}-sources.jar /home/onnxruntimedev/.artifacts

Check warning on line 53 in tools/ci_build/github/android/build_aar_and_copy_artifacts.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/android/build_aar_and_copy_artifacts.sh:53:4: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 53 in tools/ci_build/github/android/build_aar_and_copy_artifacts.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/android/build_aar_and_copy_artifacts.sh:53:17: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 53 in tools/ci_build/github/android/build_aar_and_copy_artifacts.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/android/build_aar_and_copy_artifacts.sh:53:33: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 53 in tools/ci_build/github/android/build_aar_and_copy_artifacts.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/android/build_aar_and_copy_artifacts.sh:53:47: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
cp ${BASE_PATH}/${PACKAGE_NAME}-${ORT_VERSION}${RELEASE_VERSION_SUFFIX}.aar /home/onnxruntimedev/.artifacts

Check warning on line 54 in tools/ci_build/github/android/build_aar_and_copy_artifacts.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tools/ci_build/github/android/build_aar_and_copy_artifacts.sh:54:4: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
cp ${BASE_PATH}/${PACKAGE_NAME}-${ORT_VERSION}${RELEASE_VERSION_SUFFIX}.pom /home/onnxruntimedev/.artifacts

# Copy executables if necessary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ jobs:

- script: |
set -e -x
rm -rf /tmp/scripts
cp -r tools/ci_build/github/linux/docker/inference/x86_64/python/cpu/scripts /tmp
/tmp/scripts/install_protobuf.sh -p $(Build.BinariesDirectory)/installed -d cmake/deps.txt
python3 tools/ci_build/build.py \
--config Release \
--android \
Expand All @@ -78,7 +75,7 @@ jobs:
--use_qnn \
--qnn_home $(QnnSDKRootDir) \
--cmake_generator=Ninja \
--skip_tests --path_to_protoc_exe $(Build.BinariesDirectory)/installed/bin/protoc
--skip_tests
displayName: Build QNN EP

- script: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ parameters:
variables:
- template: templates/common-variables.yml
- name: docker_base_image
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241008.1
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241010.2
- name: linux_trt_version
value: 10.3.0.26-1.cuda11.8
- name: Repository
Expand Down
4 changes: 2 additions & 2 deletions tools/ci_build/github/azure-pipelines/linux-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ stages:
onnxruntimecpubuildcentos8x64 \
/bin/bash -c '
set -ex; \
python3.9 /onnxruntime_src/tools/ci_build/build.py \
python3.12 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build --cmake_generator 'Ninja' \
--config Debug \
--skip_submodule_sync \
Expand All @@ -91,7 +91,7 @@ stages:
--build_csharp \
--enable_onnx_tests --enable_address_sanitizer \
--update --build;
LD_PRELOAD=/usr/lib64/libasan.so.6 python3.9 /onnxruntime_src/tools/ci_build/build.py \
LD_PRELOAD=/usr/lib64/libasan.so.8 python3.12 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build --cmake_generator 'Ninja' \
--config Debug \
--skip_submodule_sync \
Expand Down
132 changes: 0 additions & 132 deletions tools/ci_build/github/azure-pipelines/linux-cpu-aten-pipeline.yml

This file was deleted.

This file was deleted.

19 changes: 10 additions & 9 deletions tools/ci_build/github/azure-pipelines/linux-gpu-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ parameters:
variables:
- name: docker_base_image
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241008.1
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241010.2
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20241008.1
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20241010.2

- name: Repository
${{ if eq(parameters.CudaVersion, '11.8') }}:
Expand Down Expand Up @@ -175,13 +175,14 @@ stages:
-e NVIDIA_TF32_OVERRIDE=0 \
$(Repository) \
/bin/bash -c '
set -e
nvidia-smi; \
/sbin/ldconfig -N -v $(sed "s/:/ /" <<< $LD_LIBRARY_PATH) 2>/dev/null | grep -E "libcudart.so|libcudnn.so|libnvinfer.so"; \
cat /usr/local/cuda/include/cuda.h | grep -m1 CUDA_VERSION; \
cat /usr/include/cudnn_version.h | grep CUDNN_MAJOR -m1 -A 2; \
ln -s /opt/python/cp38-cp38/bin/python3 /tmp/python3; \
/tmp/python3 -m pip install /build/Release/dist/*.whl; \
/tmp/python3 -u -c "from onnxruntime.capi._pybind_state import (OrtDevice as C_OrtDevice) ; \
export PATH=/opt/python/cp312-cp312/bin:$PATH; \
python3 -m pip install /build/Release/dist/*.whl; \
python3 -u -c "from onnxruntime.capi._pybind_state import (OrtDevice as C_OrtDevice) ; \
ort_device = C_OrtDevice(C_OrtDevice.cuda(), C_OrtDevice.default_memory(), 0); \
print(ort_device); print(ort_device.device_type(), C_OrtDevice.cuda()); \
assert(ort_device.device_type()==1); assert(C_OrtDevice.cuda()==1);" \
Expand All @@ -204,13 +205,13 @@ stages:
/bin/bash -c '
set -ex; \
cp /onnxruntime_src/tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt /tmp/requirements.txt; \
ln -s /opt/python/cp38-cp38/bin/python3 /tmp/python3; \
/tmp/python3 -m pip install -r /tmp/requirements.txt; \
/tmp/python3 -m pip install /build/Release/dist/*.whl; \
export PATH=/opt/python/cp312-cp312/bin:$PATH; \
python3 -m pip install -r /tmp/requirements.txt; \
python3 -m pip install /build/Release/dist/*.whl; \
cd /build/Release && xargs -a /build/Release/perms.txt chmod a+x; \
cd /onnxruntime_src/java && /onnxruntime_src/java/gradlew cmakeCheck -DcmakeBuildDir=/build/Release -DUSE_CUDA=1; \
cd /tmp; \
/tmp/python3 /onnxruntime_src/tools/ci_build/build.py \
python3 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build --config Release --test --skip_submodule_sync --build_shared_lib --parallel --use_binskim_compliant_compile_flags --build_wheel --enable_onnx_tests \
--enable_transformers_tool_test --use_cuda --cuda_version=${{parameters.CudaVersion}} --cuda_home=/usr/local/cuda --cudnn_home=/usr/local/cuda \
--enable_pybind --build_java --ctest_path "" ; \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ parameters:
variables:
- name: docker_base_image
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241008.1
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241010.2
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20241008.1
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20241010.2
- name: linux_trt_version
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: 10.4.0.26-1.cuda11.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ stages:

- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
versionSpec: '3.12'
addToPath: true
architecture: ${{ parameters.BuildArch }}

Expand Down
Loading
Loading