Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"]
steps:
- uses: actions/checkout@v5
- uses: gradle/actions/wrapper-validation@v4
- uses: gradle/actions/wrapper-validation@v5
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .github/workflows/publish-csharp-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ permissions:

jobs:
build:
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
env:
DOCFXVERSION: 2.62.2
steps:
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/windows_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:
jobs:
build:
name: Windows GPU CUDA CI Pipeline
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
steps:
- uses: actions/checkout@v5
with:
Expand All @@ -41,20 +41,20 @@ jobs:
working-directory: ${{ github.workspace }}
shell: cmd

- name: Download CUDA SDK v12.2
- name: Download CUDA SDK v12.8
working-directory: ${{ runner.temp }}
run: |
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v12.2" .
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v12.8" .
dir
shell: pwsh

- name: Add CUDA to PATH
shell: powershell
run: |
Write-Host "Adding CUDA to PATH"
Write-Host "CUDA Path: $env:RUNNER_TEMP\v12.2\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.2\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.2\extras\CUPTI\lib64"
Write-Host "CUDA Path: $env:RUNNER_TEMP\v12.8\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.8\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.8\extras\CUPTI\lib64"

- uses: actions/setup-node@v5
with:
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
exit $lastExitCode
}
# Execute the build process
python.exe ${{ github.workspace }}\tools\ci_build\build.py --update --build --config RelWithDebInfo --build_dir build --skip_submodule_sync --build_csharp --parallel --use_binskim_compliant_compile_flags --cmake_generator "Visual Studio 17 2022" --build_shared_lib --build_wheel --build_java --use_cuda --cuda_home="$env:RUNNER_TEMP\v12.2" --enable_cuda_profiling --use_vcpkg --use_vcpkg_ms_internal_asset_cache --enable_transformers_tool_test --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86 --cmake_extra_defines onnxruntime_ENABLE_CUDA_EP_INTERNAL_TESTS=ON
python.exe ${{ github.workspace }}\tools\ci_build\build.py --update --build --config RelWithDebInfo --build_dir build --skip_submodule_sync --build_csharp --parallel --use_binskim_compliant_compile_flags --cmake_generator "Visual Studio 17 2022" --build_shared_lib --build_wheel --build_java --use_cuda --cuda_home="$env:RUNNER_TEMP\v12.8" --enable_cuda_profiling --use_vcpkg --use_vcpkg_ms_internal_asset_cache --enable_transformers_tool_test --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86 --cmake_extra_defines onnxruntime_ENABLE_CUDA_EP_INTERNAL_TESTS=ON
if ($lastExitCode -ne 0) {
exit $lastExitCode
}
Expand Down Expand Up @@ -188,20 +188,20 @@ jobs:
working-directory: ${{ github.workspace }}
shell: cmd

- name: Download CUDA SDK v12.2
- name: Download CUDA SDK v12.8
working-directory: ${{ runner.temp }}
run: |
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v12.2" .
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v12.8" .
dir
shell: pwsh

- name: Add CUDA to PATH
shell: powershell
run: |
Write-Host "Adding CUDA to PATH"
Write-Host "CUDA Path: $env:RUNNER_TEMP\v12.2\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.2\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.2\extras\CUPTI\lib64"
Write-Host "CUDA Path: $env:RUNNER_TEMP\v12.8\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.8\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.8\extras\CUPTI\lib64"

- name: Set OnnxRuntimeBuildDirectory
shell: pwsh
Expand All @@ -227,7 +227,7 @@ jobs:
exit $lastExitCode
}

python.exe ${{ github.workspace }}\tools\ci_build\build.py --test --config RelWithDebInfo --build_dir build --skip_submodule_sync --build_csharp --parallel --use_binskim_compliant_compile_flags --cmake_generator "Visual Studio 17 2022" --build_shared_lib --build_wheel --build_java --use_cuda --cuda_home="$env:RUNNER_TEMP\v12.2" --enable_cuda_profiling --use_vcpkg --use_vcpkg_ms_internal_asset_cache --enable_transformers_tool_test --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86 --cmake_extra_defines onnxruntime_ENABLE_CUDA_EP_INTERNAL_TESTS=ON
python.exe ${{ github.workspace }}\tools\ci_build\build.py --test --config RelWithDebInfo --build_dir build --skip_submodule_sync --build_csharp --parallel --use_binskim_compliant_compile_flags --cmake_generator "Visual Studio 17 2022" --build_shared_lib --build_wheel --build_java --use_cuda --cuda_home="$env:RUNNER_TEMP\v12.8" --enable_cuda_profiling --use_vcpkg --use_vcpkg_ms_internal_asset_cache --enable_transformers_tool_test --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86 --cmake_extra_defines onnxruntime_ENABLE_CUDA_EP_INTERNAL_TESTS=ON
if ($lastExitCode -ne 0) {
exit $lastExitCode
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_openvino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
jobs:
BUILD_OPENVINO_EP:
name: Windows OpenVINO CI Pipeline
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
timeout-minutes: 240
env:
AZCOPY_AUTO_LOGIN_TYPE: MSI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_qnn_x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
jobs:
build_test_qnn_ep:
name: Windows x64 QNN CI Pipeline (${{ matrix.QnnLibKind }})
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
timeout-minutes: 120
strategy:
matrix:
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/windows_tensorrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:
jobs:
build:
name: Windows GPU TensorRT CI Pipeline
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
steps:
- uses: actions/checkout@v5
with:
Expand All @@ -41,10 +41,10 @@ jobs:
working-directory: ${{ github.workspace }}
shell: cmd

- name: Download CUDA SDK v12.2
- name: Download CUDA SDK v12.8
working-directory: ${{ runner.temp }}
run: |
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v12.2" .
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v12.8" .
dir
shell: pwsh

Expand All @@ -56,9 +56,9 @@ jobs:
shell: powershell
run: |
Write-Host "Adding CUDA to PATH"
Write-Host "CUDA Path: $env:RUNNER_TEMP\v12.2\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.2\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.2\extras\CUPTI\lib64"
Write-Host "CUDA Path: $env:RUNNER_TEMP\v12.8\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.8\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.8\extras\CUPTI\lib64"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\TensorRT-10.9.0.34.Windows10.x86_64.cuda-12.8\lib"

- uses: actions/setup-node@v5
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
exit $lastExitCode
}
# Execute the build process
python ${{ github.workspace }}\tools\ci_build\build.py --config RelWithDebInfo --parallel --use_binskim_compliant_compile_flags --build_dir build --skip_submodule_sync --build_shared_lib --build --update --cmake_generator "Visual Studio 17 2022" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="${{ runner.temp }}\TensorRT-10.9.0.34.Windows10.x86_64.cuda-12.8" --cuda_home="${{ runner.temp }}\v12.2" --use_vcpkg --use_vcpkg_ms_internal_asset_cache --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
python ${{ github.workspace }}\tools\ci_build\build.py --config RelWithDebInfo --parallel --use_binskim_compliant_compile_flags --build_dir build --skip_submodule_sync --build_shared_lib --build --update --cmake_generator "Visual Studio 17 2022" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="${{ runner.temp }}\TensorRT-10.9.0.34.Windows10.x86_64.cuda-12.8" --cuda_home="${{ runner.temp }}\v12.8" --use_vcpkg --use_vcpkg_ms_internal_asset_cache --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
if ($lastExitCode -ne 0) {
exit $lastExitCode
}
Expand Down Expand Up @@ -193,10 +193,10 @@ jobs:
working-directory: ${{ github.workspace }}
shell: cmd

- name: Download CUDA SDK v12.2
- name: Download CUDA SDK v12.8
working-directory: ${{ runner.temp }}
run: |
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v12.2" .
azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v12.8" .
dir
shell: pwsh

Expand All @@ -208,9 +208,9 @@ jobs:
shell: powershell
run: |
Write-Host "Adding CUDA to PATH"
Write-Host "CUDA Path: $env:RUNNER_TEMP\v12.2\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.2\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.2\extras\CUPTI\lib64"
Write-Host "CUDA Path: $env:RUNNER_TEMP\v12.8\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.8\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.8\extras\CUPTI\lib64"
Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\TensorRT-10.9.0.34.Windows10.x86_64.cuda-12.8\lib"

- name: Set OnnxRuntimeBuildDirectory
Expand All @@ -237,7 +237,7 @@ jobs:
exit $lastExitCode
}

python ${{ github.workspace }}\tools\ci_build\build.py --config RelWithDebInfo --parallel --use_binskim_compliant_compile_flags --build_dir build --skip_submodule_sync --build_shared_lib --test --cmake_generator "Visual Studio 17 2022" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="${{ runner.temp }}\TensorRT-10.9.0.34.Windows10.x86_64.cuda-12.8" --cuda_home="${{ runner.temp }}\v12.2" --use_vcpkg --use_vcpkg_ms_internal_asset_cache --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
python ${{ github.workspace }}\tools\ci_build\build.py --config RelWithDebInfo --parallel --use_binskim_compliant_compile_flags --build_dir build --skip_submodule_sync --build_shared_lib --test --cmake_generator "Visual Studio 17 2022" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="${{ runner.temp }}\TensorRT-10.9.0.34.Windows10.x86_64.cuda-12.8" --cuda_home="${{ runner.temp }}\v12.8" --use_vcpkg --use_vcpkg_ms_internal_asset_cache --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
if ($lastExitCode -ne 0) {
exit $lastExitCode
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_x64_debug_build_x64_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
build_x64_debug:
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
timeout-minutes: 300

steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
build_x64_release:
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
timeout-minutes: 300

steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
build_x64_release_ep_generic_interface:
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
timeout-minutes: 300

steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
build_x64_release_vitisai:
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
timeout-minutes: 300

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_x64_release_xnnpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
build_x64_release_xnnpack:
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
timeout-minutes: 300

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
build_x86_release:
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-latest"]
timeout-minutes: 300

steps:
Expand Down
2 changes: 1 addition & 1 deletion VERSION_NUMBER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.23.0
1.24.0
9 changes: 6 additions & 3 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ option(onnxruntime_USE_VSINPU "Build with VSINPU support" OFF)
cmake_dependent_option(onnxruntime_USE_FLASH_ATTENTION "Build flash attention kernel for scaled dot product attention" ON "onnxruntime_USE_CUDA" OFF)
option(onnxruntime_USE_LEAN_ATTENTION "Build lean attention kernel for scaled dot product attention" OFF)
cmake_dependent_option(onnxruntime_USE_MEMORY_EFFICIENT_ATTENTION "Build memory efficient attention kernel for scaled dot product attention" ON "onnxruntime_USE_CUDA" OFF)
cmake_dependent_option(onnxruntime_USE_FPA_INTB_GEMM "Build FpA IntB gemm cuda kernels" ON "onnxruntime_USE_CUDA" OFF)
option(onnxruntime_USE_FPA_INTB_GEMM "Build FpA IntB gemm cuda kernels" OFF)

option(onnxruntime_BUILD_FOR_NATIVE_MACHINE "Enable this option for turning on optimization specific to this machine" OFF)
option(onnxruntime_USE_AVX "Use AVX instructions" OFF)
Expand Down Expand Up @@ -287,9 +287,13 @@ if (onnxruntime_ENABLE_TRAINING_APIS)
endif()


# Single output director for all binaries
# Single output directory for all binaries
set(RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH "Single output directory for all binaries.")

# Local mirror directory of cmake dependencies
set(REPO_ROOT ${PROJECT_SOURCE_DIR}/..)
set(onnxruntime_CMAKE_DEPS_MIRROR_DIR ${REPO_ROOT}/mirror CACHE PATH "Path to the local mirror of cmake dependencies")


include(FetchContent)

Expand Down Expand Up @@ -425,7 +429,6 @@ if (onnxruntime_EXTENDED_MINIMAL_BUILD AND NOT onnxruntime_MINIMAL_BUILD)
set(onnxruntime_MINIMAL_BUILD ON)
endif()

set(REPO_ROOT ${PROJECT_SOURCE_DIR}/..)
set(ONNXRUNTIME_ROOT ${PROJECT_SOURCE_DIR}/../onnxruntime)
set(ORTTRAINING_ROOT ${PROJECT_SOURCE_DIR}/../orttraining)
set(ORTTRAINING_SOURCE_DIR ${ORTTRAINING_ROOT}/orttraining)
Expand Down
2 changes: 1 addition & 1 deletion cmake/deps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ microsoft_gsl;https://github.com/microsoft/GSL/archive/refs/tags/v4.0.0.zip;cf36
microsoft_wil;https://github.com/microsoft/wil/archive/refs/tags/v1.0.230629.1.zip;e4a542a323c070376f7c2d1973d0f7ddbc1d2fa5
mimalloc;https://github.com/microsoft/mimalloc/archive/refs/tags/v2.1.1.zip;d5ee7d34223d0567892db5179849939c8769dc41
mp11;https://github.com/boostorg/mp11/archive/refs/tags/boost-1.82.0.zip;9bc9e01dffb64d9e0773b2e44d2f22c51aace063
onnx;https://github.com/onnx/onnx/archive/refs/tags/v1.19.0.zip;4c798b73e131438c196e6dcb9f3393968a8936f1
onnx;https://github.com/onnx/onnx/archive/refs/tags/v1.19.1.zip;c5215b5697dcdfd71799f001b8c4054a6bba6b09
# Use the latest commit of 10.9-GA
onnx_tensorrt;https://github.com/onnx/onnx-tensorrt/archive/d5dce67db7c2e64b07e055571f5ec06f7f254de2.zip;01114d3b67650857281fa50faa2e412130a63b69
protobuf;https://github.com/protocolbuffers/protobuf/archive/refs/tags/v21.12.zip;7cf2733949036c7d52fda017badcab093fe73bfa
Expand Down
6 changes: 3 additions & 3 deletions cmake/external/helper_functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# 2. Set the cmake property COMPILE_WARNING_AS_ERROR to OFF for these external projects.

function(onnxruntime_fetchcontent_declare contentName)
cmake_parse_arguments(PARSE_ARGV 1 ARG "" "URL;SOURCE_SUBDIR" "")
message(STATUS "Fetch ${contentName} from ${ARG_URL}")
FetchContent_Declare(${ARGV})
string(TOLOWER ${contentName} contentNameLower)
list(FIND ARGN SOURCE_SUBDIR index_SOURCE_SUBDIR)
if(index_SOURCE_SUBDIR GREATER_EQUAL 0)
cmake_parse_arguments(PARSE_ARGV 1 ARG "" "SOURCE_SUBDIR" "")
if(NOT "${ARG_SOURCE_SUBDIR}" STREQUAL "")
set(onnxruntime_${contentNameLower}_cmake_src_dir "${ARG_SOURCE_SUBDIR}" PARENT_SCOPE)
endif()
endfunction()
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/onnx
Submodule onnx updated 1946 files
10 changes: 2 additions & 8 deletions cmake/external/onnxruntime_external_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ foreach(ONNXRUNTIME_DEP IN LISTS ONNXRUNTIME_DEPS_LIST)

if(ONNXRUNTIME_DEP_URL MATCHES "^https://")
# Search a local mirror folder
string(REGEX REPLACE "^https://" "${REPO_ROOT}/mirror/" LOCAL_URL "${ONNXRUNTIME_DEP_URL}")
string(REGEX REPLACE "^https://" "${onnxruntime_CMAKE_DEPS_MIRROR_DIR}/" LOCAL_URL "${ONNXRUNTIME_DEP_URL}")

if(EXISTS "${LOCAL_URL}")
cmake_path(ABSOLUTE_PATH LOCAL_URL)
Expand Down Expand Up @@ -498,13 +498,7 @@ else()
endif()

if(Patch_FOUND)
set(ONNXRUNTIME_ONNX_PATCH_COMMAND
${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/onnx/onnx.patch &&
# Patch changes from https://github.com/onnx/onnx/pull/7253 to avoid unnecessary rebuilding.
# This change should be included in ONNX 1.19.1.
${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 <
${PROJECT_SOURCE_DIR}/patches/onnx/avoid_regenerating_proto_files.patch
)
set(ONNXRUNTIME_ONNX_PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/onnx/onnx.patch)
else()
set(ONNXRUNTIME_ONNX_PATCH_COMMAND "")
endif()
Expand Down
4 changes: 2 additions & 2 deletions cmake/onnxruntime_providers_cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@

# Since CUDA 12.8, compiling diagnostics become stricter
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.8)
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:--relocatable-device-code=true>")
set_target_properties(${target} PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:--static-global-template-stub=false>")

if (MSVC)
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4505>")
endif()
Expand Down
8 changes: 5 additions & 3 deletions cmake/onnxruntime_test_pch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
target_precompile_headers(onnxruntime_test_all PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/test_pch.h"
)
target_precompile_headers(onnxruntime_provider_test PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/test_pch.h"
)
if (TARGET onnxruntime_provider_test)
target_precompile_headers(onnxruntime_provider_test PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/test_pch.h"
)
endif()
endif()

# Exclude certain files that might conflict with PCH
Expand Down
5 changes: 5 additions & 0 deletions cmake/onnxruntime_unittests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,11 @@ block()
LIBS ${onnxruntime_provider_test_libs}
DEPENDS ${onnxruntime_provider_test_deps}
)
if (UNIX AND (onnxruntime_USE_TENSORRT OR onnxruntime_USE_NV))
# The test_main.cc includes NvInfer.h where it has many deprecated declarations
# simply ignore them for TensorRT EP build
set_property(TARGET onnxruntime_provider_test APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations")
endif()

# enable dynamic plugin EP usage
target_compile_definitions(onnxruntime_provider_test PRIVATE ORT_UNIT_TEST_ENABLE_DYNAMIC_PLUGIN_EP_USAGE)
Expand Down
Loading