diff --git a/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml b/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml index cf3bee49f1971..2370c631b7a7a 100644 --- a/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml +++ b/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml @@ -142,7 +142,7 @@ jobs: - name: Upload WASM artifacts if: ${{ inputs.skip_publish != true }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: ${{ inputs.build_config }}_wasm path: ${{ github.workspace }}/artifacts/wasm @@ -171,7 +171,7 @@ jobs: - name: Publish test results if: ${{ always() && inputs.build_config == 'Debug' }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: test-results path: ${{ github.workspace }}/build/**/*.results.xml diff --git a/.github/workflows/linux_cuda_ci.yml b/.github/workflows/linux_cuda_ci.yml index 9ec5ea47fbf0c..886705471b7de 100644 --- a/.github/workflows/linux_cuda_ci.yml +++ b/.github/workflows/linux_cuda_ci.yml @@ -63,7 +63,7 @@ jobs: # --- Download Build Artifact to Runner Temp Directory --- - name: Download Build Artifact - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: build-output-x64-Release # Must match the upload name path: ${{ runner.temp }}/Release # Download contents into temp dir structure diff --git a/.github/workflows/linux_minimal_build.yml b/.github/workflows/linux_minimal_build.yml index d7b6303d3cdc9..af86975ee6cdc 100644 --- a/.github/workflows/linux_minimal_build.yml +++ b/.github/workflows/linux_minimal_build.yml @@ -49,7 +49,7 @@ jobs: uses: microsoft/onnxruntime-github-actions/build-and-prep-ort-files@v0.0.9 - name: Upload Test Data Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: test_data path: ${{ runner.temp }}/minimal_build_test_data/ @@ -512,7 +512,7 @@ jobs: with: node-version: 20 - name: Download Test Data Artifact - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: test_data path: ${{ runner.temp }}/.test_data/ diff --git a/.github/workflows/linux_tensorrt_ci.yml b/.github/workflows/linux_tensorrt_ci.yml index 064ad87794cdd..0e26576829e94 100644 --- a/.github/workflows/linux_tensorrt_ci.yml +++ b/.github/workflows/linux_tensorrt_ci.yml @@ -65,7 +65,7 @@ jobs: # --- Download Build Artifact to Runner Temp Directory --- - name: Download Build Artifact - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: build-output-x64-Release # Must match the upload name path: ${{ runner.temp }}/Release # Download contents into temp dir structure diff --git a/.github/workflows/publish-c-apidocs.yml b/.github/workflows/publish-c-apidocs.yml index fb4e92715a723..25b7899584bbf 100644 --- a/.github/workflows/publish-c-apidocs.yml +++ b/.github/workflows/publish-c-apidocs.yml @@ -45,7 +45,7 @@ jobs: rm -rf site/docs/api/c mv build/doxygen/html _site/docs/api/c - name: Upload new site - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: onnxruntime-c-apidocs path: _site diff --git a/.github/workflows/publish-csharp-apidocs.yml b/.github/workflows/publish-csharp-apidocs.yml index 683c5594e82f2..34b9c1af9552f 100644 --- a/.github/workflows/publish-csharp-apidocs.yml +++ b/.github/workflows/publish-csharp-apidocs.yml @@ -56,7 +56,7 @@ jobs: if (Test-Path $OutputDirectory) { Remove-Item -Recurse -Force $OutputDirectory } Move-Item -Path csharp\ApiDocs\csharp -Destination $OutputDirectory - name: Upload docs artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: onnxruntime-csharp-apidocs path: _site diff --git a/.github/workflows/publish-java-apidocs.yml b/.github/workflows/publish-java-apidocs.yml index 742069542ecb9..656d0627ed17d 100644 --- a/.github/workflows/publish-java-apidocs.yml +++ b/.github/workflows/publish-java-apidocs.yml @@ -43,7 +43,7 @@ jobs: mkdir -p _site/docs/api mv java/build/docs/javadoc _site/docs/api/java - name: Upload new site - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: onnxruntime-java-apidocs path: _site diff --git a/.github/workflows/publish-js-apidocs.yml b/.github/workflows/publish-js-apidocs.yml index cada1ceecd8e0..e71d3b3c57a4b 100644 --- a/.github/workflows/publish-js-apidocs.yml +++ b/.github/workflows/publish-js-apidocs.yml @@ -43,7 +43,7 @@ jobs: mkdir -p _site/docs/api mv js/common/docs _site/docs/api/js - name: Upload docs artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: onnxruntime-node-apidocs path: _site diff --git a/.github/workflows/publish-objectivec-apidocs.yml b/.github/workflows/publish-objectivec-apidocs.yml index 7f1611fdff315..983d3d478a49d 100644 --- a/.github/workflows/publish-objectivec-apidocs.yml +++ b/.github/workflows/publish-objectivec-apidocs.yml @@ -52,7 +52,7 @@ jobs: shell: bash - name: Upload new site - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: onnxruntime-objectivec-apidocs path: ./_site diff --git a/.github/workflows/publish-python-apidocs.yml b/.github/workflows/publish-python-apidocs.yml index 4baa8a0f5c272..389d1683fb1ff 100644 --- a/.github/workflows/publish-python-apidocs.yml +++ b/.github/workflows/publish-python-apidocs.yml @@ -50,7 +50,7 @@ jobs: mkdir -p _site/docs/api/ mv build/docs/html _site/docs/api/python - name: Upload docs artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: onnxruntime-python-apidocs path: _site diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 04f40c58868ca..f827f3bc95456 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -63,7 +63,7 @@ jobs: cp ${BASE_PATH}/*.pom ${{ runner.temp }}/artifacts - name: Upload Android AAR Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: onnxruntime-android-full-aar path: ${{ runner.temp }}/artifacts @@ -102,7 +102,7 @@ jobs: run: sudo apt-get update && sudo apt-get install -y ninja-build - name: Download Android AAR artifacts - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: onnxruntime-android-full-aar path: ${{ runner.temp }}/android-full-aar @@ -206,7 +206,7 @@ jobs: --build-settings-file ${{ github.workspace }}/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json - name: Upload iOS Pod Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: ios_pod path: ${{ runner.temp }}/ios_pod @@ -221,7 +221,7 @@ jobs: uses: actions/checkout@v5 - name: Download iOS pod artifact - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: ios_pod path: ${{ runner.temp }}/ios_pod @@ -277,7 +277,7 @@ jobs: uses: actions/checkout@v5 - name: Download iOS pod artifact - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: ios_pod path: ${{ runner.temp }}/ios_pod diff --git a/.github/workflows/reusable_linux_build.yml b/.github/workflows/reusable_linux_build.yml index 1a9c0e0a72031..02e6388ce4738 100644 --- a/.github/workflows/reusable_linux_build.yml +++ b/.github/workflows/reusable_linux_build.yml @@ -163,7 +163,7 @@ jobs: # ------------- Upload Build Output Step ------------- - name: Upload Build Output Artifact if: inputs.upload_build_output == true - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: build-output-${{ inputs.architecture }}-${{ inputs.build_config }} path: ${{ runner.temp }}/${{ inputs.build_config }} @@ -172,7 +172,7 @@ jobs: # ------------- Upload Log on Build Failure Step ------------- - name: Upload VCPKG Manifest Install Log on Update or Build Failure if: steps.update_step.outcome == 'failure' || steps.build_step.outcome == 'failure' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: vcpkg-manifest-install-log-${{ inputs.architecture }}-${{ inputs.build_config }} path: ${{ runner.temp }}/${{ inputs.build_config }}/${{ inputs.build_config }}/vcpkg-manifest-install.log diff --git a/.github/workflows/windows-web-ci-workflow.yml b/.github/workflows/windows-web-ci-workflow.yml index 6ebc6bd7fea43..eee98332056f6 100644 --- a/.github/workflows/windows-web-ci-workflow.yml +++ b/.github/workflows/windows-web-ci-workflow.yml @@ -67,7 +67,7 @@ jobs: node-version: "20.x" - name: Download WebAssembly artifacts - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: ${{ inputs.build_config }}_wasm path: ${{ github.workspace }}/artifacts_wasm @@ -173,7 +173,7 @@ jobs: # this step is added to help investigate the shader validation failure which is hard to reproduce - name: Upload WebGPU shader validation log on failure if: ${{ failure() && inputs.build_config == 'Debug' }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: webgpu-shader-validation-logs path: ${{ runner.temp }}\web\test\07\chrome_debug.log @@ -203,7 +203,7 @@ jobs: - name: Upload NPM packages if: ${{ inputs.build_config == 'Release' }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: ${{ inputs.package_name }} path: ${{ github.workspace }}\artifacts_npm diff --git a/.github/workflows/windows_cuda.yml b/.github/workflows/windows_cuda.yml index ae23902a015ab..fd5b65eb039a3 100644 --- a/.github/workflows/windows_cuda.yml +++ b/.github/workflows/windows_cuda.yml @@ -132,7 +132,7 @@ jobs: shell: pwsh - name: Upload build artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: build-artifacts path: ${{ runner.temp }}\build @@ -158,7 +158,7 @@ jobs: submodules: 'none' - name: Download build artifacts - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: build-artifacts path: ${{ runner.temp }}\build diff --git a/.github/workflows/windows_tensorrt.yml b/.github/workflows/windows_tensorrt.yml index f8c6471b412c0..229efb01f0018 100644 --- a/.github/workflows/windows_tensorrt.yml +++ b/.github/workflows/windows_tensorrt.yml @@ -137,7 +137,7 @@ jobs: shell: pwsh - name: Upload build artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: build-artifacts path: ${{ runner.temp }}\build @@ -163,7 +163,7 @@ jobs: submodules: 'none' - name: Download build artifacts - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: build-artifacts path: ${{ runner.temp }}\build diff --git a/.github/workflows/windows_x64_debug_build_x64_debug.yml b/.github/workflows/windows_x64_debug_build_x64_debug.yml index e4d1477b5619c..d62c7130e0ebb 100644 --- a/.github/workflows/windows_x64_debug_build_x64_debug.yml +++ b/.github/workflows/windows_x64_debug_build_x64_debug.yml @@ -109,14 +109,14 @@ jobs: # Publish artifacts only on failure and if DocUpdateNeeded is true (example) - name: Publish OperatorKernels.md (Conditional) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: failure() && env.DocUpdateNeeded == 'true' # Use env. for step-level vars with: name: OperatorKernels.md path: ${{ github.workspace }}/docs/OperatorKernels.md - name: Publish ContribOperators.md (Conditional) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: failure() && env.DocUpdateNeeded == 'true' with: name: ContribOperators.md diff --git a/.github/workflows/windows_x64_release_build_x64_release.yml b/.github/workflows/windows_x64_release_build_x64_release.yml index 46b667ac22b02..a2991bb0f1131 100644 --- a/.github/workflows/windows_x64_release_build_x64_release.yml +++ b/.github/workflows/windows_x64_release_build_x64_release.yml @@ -107,14 +107,14 @@ jobs: working-directory: "${{ github.workspace }}\\build\\RelWithDebInfo\\RelWithDebInfo" - name: Publish OperatorKernels.md (Conditional) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: failure() && env.DocUpdateNeeded == 'true' with: name: OperatorKernels.md path: ${{ github.workspace }}/docs/OperatorKernels.md - name: Publish ContribOperators.md (Conditional) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: failure() && env.DocUpdateNeeded == 'true' with: name: ContribOperators.md diff --git a/.github/workflows/windows_x64_release_ep_generic_interface_build_x64_release_ep_generic_interface.yml b/.github/workflows/windows_x64_release_ep_generic_interface_build_x64_release_ep_generic_interface.yml index 4026869c6e4f2..bb6c5035b0dce 100644 --- a/.github/workflows/windows_x64_release_ep_generic_interface_build_x64_release_ep_generic_interface.yml +++ b/.github/workflows/windows_x64_release_ep_generic_interface_build_x64_release_ep_generic_interface.yml @@ -92,14 +92,14 @@ jobs: run: python tools\ValidateNativeDelegateAttributes.py working-directory: ${{ github.workspace }}\\csharp - name: Publish OperatorKernels.md (Conditional) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: failure() && env.DocUpdateNeeded == 'true' with: name: OperatorKernels.md path: ${{ github.workspace }}/docs/OperatorKernels.md - name: Publish ContribOperators.md (Conditional) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: failure() && env.DocUpdateNeeded == 'true' with: name: ContribOperators.md diff --git a/.github/workflows/windows_x64_release_xnnpack.yml b/.github/workflows/windows_x64_release_xnnpack.yml index dd8c251ea23d3..b453cd570ac05 100644 --- a/.github/workflows/windows_x64_release_xnnpack.yml +++ b/.github/workflows/windows_x64_release_xnnpack.yml @@ -94,14 +94,14 @@ jobs: working-directory: ${{ github.workspace }}\\csharp - name: Publish OperatorKernels.md (Conditional) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: failure() && env.DocUpdateNeeded == 'true' with: name: OperatorKernels.md path: ${{ github.workspace }}/docs/OperatorKernels.md - name: Publish ContribOperators.md (Conditional) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: failure() && env.DocUpdateNeeded == 'true' with: name: ContribOperators.md diff --git a/.github/workflows/windows_x86.yml b/.github/workflows/windows_x86.yml index e8f04a955e32e..d81c5d559c8e5 100644 --- a/.github/workflows/windows_x86.yml +++ b/.github/workflows/windows_x86.yml @@ -102,14 +102,14 @@ jobs: working-directory: "${{ github.workspace }}\\build\\RelWithDebInfo\\RelWithDebInfo" - name: Publish OperatorKernels.md (Conditional) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: failure() && env.DocUpdateNeeded == 'true' with: name: OperatorKernels.md path: ${{ github.workspace }}/docs/OperatorKernels.md - name: Publish ContribOperators.md (Conditional) - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: failure() && env.DocUpdateNeeded == 'true' with: name: ContribOperators.md diff --git a/cmake/deps.txt b/cmake/deps.txt index bf76753c1b3c0..22c793705ddeb 100644 --- a/cmake/deps.txt +++ b/cmake/deps.txt @@ -47,7 +47,7 @@ protoc_mac_universal;https://github.com/protocolbuffers/protobuf/releases/downlo psimd;https://github.com/Maratyszcza/psimd/archive/072586a71b55b7f8c584153d223e95687148a900.zip;1f5454b01f06f9656b77e4a5e2e31d7422487013 pthreadpool;https://github.com/google/pthreadpool/archive/dcc9f28589066af0dbd4555579281230abbf74dd.zip;533a77943203ef15ca608bcd9dbe2c94da7451d2 pybind11;https://github.com/pybind/pybind11/archive/refs/tags/v2.13.6.zip;f780292da9db273c8ef06ccf5fd4b623624143e9 -pytorch_cpuinfo;https://github.com/pytorch/cpuinfo/archive/de0ce7c7251372892e53ce9bc891750d2c9a4fd8.zip;c45b8d3619b9bccbd26dc5f657959aee38b18b7a +pytorch_cpuinfo;https://github.com/pytorch/cpuinfo/archive/877328f188a3c7d1fa855871a278eb48d530c4c0.zip;9152d4bf6b8bde9f19b116de3bd8a745097ed9df re2;https://github.com/google/re2/archive/refs/tags/2024-07-02.zip;646e1728269cde7fcef990bf4a8e87b047882e88 safeint;https://github.com/dcleblanc/SafeInt/archive/refs/tags/3.0.28.zip;23f252040ff6cb9f1fd18575b32fa8fb5928daac tensorboard;https://github.com/tensorflow/tensorboard/archive/373eb09e4c5d2b3cc2493f0949dc4be6b6a45e81.zip;67b833913605a4f3f499894ab11528a702c2b381 diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake index 603d578e696ef..b02d0e82d9ee4 100644 --- a/cmake/external/onnxruntime_external_deps.cmake +++ b/cmake/external/onnxruntime_external_deps.cmake @@ -440,7 +440,7 @@ if(onnxruntime_USE_VCPKG) find_package(flatbuffers REQUIRED) else() # We do not need to build flatc for iOS or Android Cross Compile -if (CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Emscripten") +if (CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAKE_SYSTEM_NAME STREQUAL "visionOS" OR CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Emscripten") set(FLATBUFFERS_BUILD_FLATC OFF CACHE BOOL "FLATBUFFERS_BUILD_FLATC" FORCE) endif() set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "FLATBUFFERS_BUILD_TESTS" FORCE) diff --git a/cmake/onnxruntime_mlas.cmake b/cmake/onnxruntime_mlas.cmake index 7b631895d8d95..d091995ccf508 100644 --- a/cmake/onnxruntime_mlas.cmake +++ b/cmake/onnxruntime_mlas.cmake @@ -829,7 +829,7 @@ endif() foreach(mlas_target ${ONNXRUNTIME_MLAS_LIBS}) target_include_directories(${mlas_target} PRIVATE ${MLAS_INC_DIR} ${MLAS_SRC_DIR}) - onnxruntime_add_include_to_target(${mlas_target} ${GSL_TARGET}) + onnxruntime_add_include_to_target(${mlas_target} ${GSL_TARGET} safeint_interface) target_compile_definitions(${mlas_target} PRIVATE ${mlas_private_compile_definitions}) diff --git a/cmake/onnxruntime_providers_cuda.cmake b/cmake/onnxruntime_providers_cuda.cmake index 1d31eb1fbd207..9e754e4a67d40 100644 --- a/cmake/onnxruntime_providers_cuda.cmake +++ b/cmake/onnxruntime_providers_cuda.cmake @@ -222,6 +222,7 @@ if(MSVC) target_compile_options(${target} PRIVATE "$<$:SHELL:-Xcompiler /Zc:__cplusplus>") + target_compile_options(${target} PRIVATE "$<$:SHELL:-Xcompiler /bigobj>") endif() onnxruntime_add_include_to_target(${target} onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers) diff --git a/cmake/onnxruntime_python.cmake b/cmake/onnxruntime_python.cmake index ff49be1ab3d6b..e449bb107e77b 100644 --- a/cmake/onnxruntime_python.cmake +++ b/cmake/onnxruntime_python.cmake @@ -962,13 +962,33 @@ if (onnxruntime_USE_TENSORRT) endif() if (onnxruntime_USE_NV) + if (WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + file(GLOB NV_LIB_FILES LIST_DIRECTORIES false "${TENSORRT_RTX_ROOT}/lib/tensorrt_*.dll" + "${TENSORRT_RTX_ROOT}/bin/tensorrt_*.dll" + "${TENSORRT_RTX_ROOT}/lib/libtensorrt_*.so" + "${TENSORRT_RTX_ROOT}/bin/libtensorrt_*.so") + message(STATUS "NV lib files: " ${NV_LIB_FILES}) + endif() add_custom_command( TARGET onnxruntime_pybind11_state POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy + ${NV_LIB_FILES} $ $ $/onnxruntime/capi/ ) + if (EXISTS "${TENSORRT_RTX_ROOT}/doc/LICENSE.txt") + add_custom_command( + TARGET onnxruntime_pybind11_state POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${TENSORRT_RTX_ROOT}/doc/LICENSE.txt" $/onnxruntime/TRT_RTX_LICENSE.txt + ) + endif() + if (EXISTS "${TENSORRT_RTX_ROOT}/doc/Acknowledgements.txt") + add_custom_command( + TARGET onnxruntime_pybind11_state POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${TENSORRT_RTX_ROOT}/doc/Acknowledgements.txt" $/onnxruntime/TRT_RTX_Acknowledgements.txt + ) + endif() endif() if (onnxruntime_USE_MIGRAPHX) diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 460736ff8506e..57ad1e597a205 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -1982,9 +1982,13 @@ endif() if (WIN32 AND onnxruntime_BUILD_SHARED_LIB AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten" AND NOT onnxruntime_MINIMAL_BUILD) + + # # example_plugin_ep - file(GLOB onnxruntime_autoep_test_library_src "${TEST_SRC_DIR}/autoep/library/*.h" - "${TEST_SRC_DIR}/autoep/library/*.cc") + # + file(GLOB onnxruntime_autoep_test_library_src "${TEST_SRC_DIR}/autoep/library/example_plugin_ep/*.h" + "${TEST_SRC_DIR}/autoep/library/example_plugin_ep/*.cc" + "${TEST_SRC_DIR}/autoep/library/plugin_ep_utils.h") onnxruntime_add_shared_library_module(example_plugin_ep ${onnxruntime_autoep_test_library_src}) target_include_directories(example_plugin_ep PRIVATE ${REPO_ROOT}/include/onnxruntime/core/session) target_link_libraries(example_plugin_ep PRIVATE onnxruntime) @@ -1994,12 +1998,12 @@ if (WIN32 AND onnxruntime_BUILD_SHARED_LIB AND set(ONNXRUNTIME_AUTOEP_LIB_LINK_FLAG "-Xlinker -dead_strip") elseif (NOT CMAKE_SYSTEM_NAME MATCHES "AIX") string(CONCAT ONNXRUNTIME_AUTOEP_LIB_LINK_FLAG - "-Xlinker --version-script=${TEST_SRC_DIR}/autoep/library/example_plugin_ep_library.lds " + "-Xlinker --version-script=${TEST_SRC_DIR}/autoep/library/example_plugin_ep/example_plugin_ep_library.lds " "-Xlinker --no-undefined -Xlinker --gc-sections -z noexecstack") endif() else() set(ONNXRUNTIME_AUTOEP_LIB_LINK_FLAG - "-DEF:${TEST_SRC_DIR}/autoep/library/example_plugin_ep_library.def") + "-DEF:${TEST_SRC_DIR}/autoep/library/example_plugin_ep/example_plugin_ep_library.def") endif() set_property(TARGET example_plugin_ep APPEND_STRING PROPERTY LINK_FLAGS @@ -2008,7 +2012,42 @@ if (WIN32 AND onnxruntime_BUILD_SHARED_LIB AND set_target_properties(example_plugin_ep PROPERTIES FOLDER "ONNXRuntimeTest") source_group(TREE ${TEST_SRC_DIR} FILES ${onnxruntime_autoep_test_library_src}) + # + # example_plugin_ep_virt_gpu + # + set(onnxruntime_autoep_test_example_plugin_ep_virt_gpu_src + "${TEST_SRC_DIR}/autoep/library/plugin_ep_utils.h" + "${TEST_SRC_DIR}/autoep/library/example_plugin_ep_virt_gpu/ep_lib_entry.cc" + "${TEST_SRC_DIR}/autoep/library/example_plugin_ep_virt_gpu/ep_factory.h" + "${TEST_SRC_DIR}/autoep/library/example_plugin_ep_virt_gpu/ep_factory.cc" + "${TEST_SRC_DIR}/autoep/library/example_plugin_ep_virt_gpu/ep.h" + "${TEST_SRC_DIR}/autoep/library/example_plugin_ep_virt_gpu/ep.cc") + onnxruntime_add_shared_library_module(example_plugin_ep_virt_gpu ${onnxruntime_autoep_test_example_plugin_ep_virt_gpu_src}) + target_include_directories(example_plugin_ep_virt_gpu PRIVATE ${REPO_ROOT}/include/onnxruntime/core/session) + target_link_libraries(example_plugin_ep_virt_gpu PRIVATE onnxruntime) + + if(UNIX) + if (APPLE) + set(ONNXRUNTIME_AUTOEP_EP_LIB_VIRT_GPU_LINK_FLAG "-Xlinker -dead_strip") + elseif (NOT CMAKE_SYSTEM_NAME MATCHES "AIX") + string(CONCAT ONNXRUNTIME_AUTOEP_EP_LIB_VIRT_GPU_LINK_FLAG + "-Xlinker --version-script=${TEST_SRC_DIR}/autoep/library/example_plugin_ep_virt_gpu/ep_lib.lds " + "-Xlinker --no-undefined -Xlinker --gc-sections -z noexecstack") + endif() + else() + set(ONNXRUNTIME_AUTOEP_EP_LIB_VIRT_GPU_LINK_FLAG + "-DEF:${TEST_SRC_DIR}/autoep/library/example_plugin_ep_virt_gpu/ep_lib.def") + endif() + + set_property(TARGET example_plugin_ep_virt_gpu APPEND_STRING PROPERTY LINK_FLAGS + ${ONNXRUNTIME_AUTOEP_EP_LIB_VIRT_GPU_LINK_FLAG}) + + set_target_properties(example_plugin_ep_virt_gpu PROPERTIES FOLDER "ONNXRuntimeTest") + source_group(TREE ${TEST_SRC_DIR} FILES ${onnxruntime_autoep_test_example_plugin_ep_virt_gpu_src}) + + # # test library + # file(GLOB onnxruntime_autoep_test_SRC "${ONNXRUNTIME_AUTOEP_TEST_SRC_DIR}/*.h" "${ONNXRUNTIME_AUTOEP_TEST_SRC_DIR}/*.cc") @@ -2041,7 +2080,7 @@ if (WIN32 AND onnxruntime_BUILD_SHARED_LIB AND TARGET onnxruntime_autoep_test SOURCES ${onnxruntime_autoep_test_SRC} ${onnxruntime_unittest_main_src} LIBS ${onnxruntime_autoep_test_LIBS} - DEPENDS ${all_dependencies} example_plugin_ep + DEPENDS ${all_dependencies} example_plugin_ep example_plugin_ep_virt_gpu ) endif() diff --git a/cmake/vcpkg-ports/cpuinfo/portfile.cmake b/cmake/vcpkg-ports/cpuinfo/portfile.cmake index eeb0007195ca3..80192840ee9b0 100644 --- a/cmake/vcpkg-ports/cpuinfo/portfile.cmake +++ b/cmake/vcpkg-ports/cpuinfo/portfile.cmake @@ -6,8 +6,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pytorch/cpuinfo - REF de0ce7c7251372892e53ce9bc891750d2c9a4fd8 - SHA512 0fde9210b700d2648d37c8deeb0d5c0d007d8ca5689578dd3bce4c460886b20d7649f0194d2ea06b02238fe9d4f06193599ec3ab5cafb19f1f860b00404264fa + REF 877328f188a3c7d1fa855871a278eb48d530c4c0 + SHA512 b6d5a9ce9996eee3b2f09f39115f7ae178fe4d4814cc35b049a59d04a82228e268aa52d073c307ccb56a427428622940e1c77f004c99851dfca0d3a5d803658b HEAD_REF master PATCHES patch_cpuinfo_h_for_arm64ec.patch diff --git a/cmake/vcpkg-ports/cpuinfo/vcpkg.json b/cmake/vcpkg-ports/cpuinfo/vcpkg.json index ce93591dba5ac..f1ccda72679b1 100644 --- a/cmake/vcpkg-ports/cpuinfo/vcpkg.json +++ b/cmake/vcpkg-ports/cpuinfo/vcpkg.json @@ -1,7 +1,7 @@ { "name": "cpuinfo", - "version-date": "2024-12-09", - "port-version": 3, + "version-date": "2025-10-23", + "port-version": 4, "description": "CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)", "homepage": "https://github.com/pytorch/cpuinfo", "license": "BSD-2-Clause", diff --git a/csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj b/csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj index 73a535999672c..310aaf98ae08d 100644 --- a/csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj +++ b/csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj @@ -1,7 +1,7 @@  - net8.0-android;net8.0-ios;net8.0-maccatalyst + net9.0-android;net9.0-ios;net9.0-maccatalyst $(TargetFrameworks);net8.0-windows10.0.19041.0 Exe Microsoft.ML.OnnxRuntime.InferenceSample.Maui diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj b/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj index be0e8d2ee58a4..193be042ae420 100644 --- a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj +++ b/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj @@ -19,12 +19,12 @@ - net8.0-android;net8.0-ios;net8.0-maccatalyst + net9.0-android;net9.0-ios;net9.0-maccatalyst - net8.0-android + net9.0-android diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/targets/net8.0-android/targets.xml b/csharp/src/Microsoft.ML.OnnxRuntime/targets/net9.0-android/targets.xml similarity index 100% rename from csharp/src/Microsoft.ML.OnnxRuntime/targets/net8.0-android/targets.xml rename to csharp/src/Microsoft.ML.OnnxRuntime/targets/net9.0-android/targets.xml diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/targets/net8.0-ios/targets.xml b/csharp/src/Microsoft.ML.OnnxRuntime/targets/net9.0-ios/targets.xml similarity index 100% rename from csharp/src/Microsoft.ML.OnnxRuntime/targets/net8.0-ios/targets.xml rename to csharp/src/Microsoft.ML.OnnxRuntime/targets/net9.0-ios/targets.xml diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/targets/net8.0-maccatalyst/README.md b/csharp/src/Microsoft.ML.OnnxRuntime/targets/net9.0-maccatalyst/README.md similarity index 100% rename from csharp/src/Microsoft.ML.OnnxRuntime/targets/net8.0-maccatalyst/README.md rename to csharp/src/Microsoft.ML.OnnxRuntime/targets/net9.0-maccatalyst/README.md diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/targets/net8.0-maccatalyst/_._ b/csharp/src/Microsoft.ML.OnnxRuntime/targets/net9.0-maccatalyst/_._ similarity index 100% rename from csharp/src/Microsoft.ML.OnnxRuntime/targets/net8.0-maccatalyst/_._ rename to csharp/src/Microsoft.ML.OnnxRuntime/targets/net9.0-maccatalyst/_._ diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.BrowserStack.Android/README.md b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.BrowserStack.Android/README.md index 9c4e2307d8f70..d92bb394210f6 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.BrowserStack.Android/README.md +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.BrowserStack.Android/README.md @@ -2,11 +2,11 @@ This project will run the Android MAUI tests on BrowserStack, which allows you to run automated tests on a variety of mobile devices. ## Context -Microsoft.ML.OnnxRuntime.Tests.MAUI uses DeviceRunners.VisualRunners to allow running the unit tests (found in Microsoft.ML.OnnxRuntime.Tests.Common) across multiple devices. DeviceRunners.VisualRunners provides a simple UI with a button that will run the unit tests and a panel with the unit test results. +Microsoft.ML.OnnxRuntime.Tests.MAUI uses DeviceRunners.VisualRunners to allow running the unit tests (found in Microsoft.ML.OnnxRuntime.Tests.Common) across multiple devices. DeviceRunners.VisualRunners provides a simple UI with a button that will run the unit tests and a panel with the unit test results. In order to automate the process of running the unit tests across mobile devices, Appium is used for UI testing orchestration (it provides a way to interact with the UI), and BrowserStack automatically runs these Appium tests across different mobile devices. -This project does not include the capability to start an Appium server locally or attach to a local emulator or device. +This project does not include the capability to start an Appium server locally or attach to a local emulator or device. ## Build & run instructions ### Requirements @@ -22,8 +22,8 @@ This project does not include the capability to start an Appium server locally o ### Run instructions 1. Build the Microsoft.ML.OnnxRuntime.Tests.MAUI project into a signed APK. - 1. Run the following: `dotnet publish -c Release -f net8.0-android` in the Microsoft.ML.OnnxRuntime.Tests.MAUI directory. - 2. Search for the APK files generated. They should be located in `bin\Release\net8.0-android\publish`. + 1. Run the following: `dotnet publish -c Release -f net9.0-android` in the Microsoft.ML.OnnxRuntime.Tests.MAUI directory. + 2. Search for the APK files generated. They should be located in `bin\Release\net9.0-android\publish`. 3. If they're in a different location, edit the `browserstack.yml` file to target the path to the signed APK. 2. Ensure you've set the BrowserStack credentials as environment variables. 3. Run the following in the Microsoft.ML.OnnxRuntime.Tests.Android.BrowserStack directory: `dotnet test` @@ -36,13 +36,13 @@ This project does not include the capability to start an Appium server locally o - [Integration guide](https://www.browserstack.com/docs/app-automate/appium/getting-started/c-sharp/nunit/integrate-your-tests#CLI) ### Troubleshooting -- Issues building the MAUI app: +- Issues building the MAUI app: - Make sure that the maui and maui-android workloads are installed correctly by running `dotnet workload list` - If you believe the issues are workload related, you can also try running `dotnet workload repair` (this has personally never worked for me) - - Try running `dotnet clean`. However, this does not fully remove all the previous intermediaries. If you're still running into the errors, manually deleting the bin and obj folders can sometimes resolve them. + - Try running `dotnet clean`. However, this does not fully remove all the previous intermediaries. If you're still running into the errors, manually deleting the bin and obj folders can sometimes resolve them. - After building the MAUI app, try installing on an emulator and clicking the "Run All" button to ensure that everything is working. (If you are missing the ONNXRuntime package, it will not show up as an error until you click "Run All".) - Running the MAUI app from Visual Studio will not replicate running it through BrowserStack. Instead, use `adb install [path to signed apk]` to install the app then use the emulator to launch the app. - Issues with the Android.BrowserStack test app: there is an Appium Doctor package on npm -- run `npm install @appium/doctor --location=global` then `appium-doctor --android` and follow the directed instructions. Some errors with Appium on Android will not appear until runtime. - Connection refused by Appium server: this can happen if you already have an Appium server running locally. If you do, stop the Appium server then try `dotnet test` again. -- App is crashing on BrowserStack or it emits an error that it cannot run this APK file: make sure that you are passing in the correct signed APK from the publish folder. +- App is crashing on BrowserStack or it emits an error that it cannot run this APK file: make sure that you are passing in the correct signed APK from the publish folder. - It appears that a test runs on CLI but a build is not launched on BrowserStack: this happens when the BrowserStack Test Adapter cannot find the browserstack.yml file (which has to be named "browserstack.yml" -- do not be tricked by BrowserStack's article on custom-named configuration files) diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.BrowserStack.Android/browserstack.yml b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.BrowserStack.Android/browserstack.yml index 0afa8ca9c7fae..d9866901fd95c 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.BrowserStack.Android/browserstack.yml +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.BrowserStack.Android/browserstack.yml @@ -1,4 +1,4 @@ -app: ..\Microsoft.ML.OnnxRuntime.Tests.MAUI\bin\Release\net8.0-android\publish\ORT.CSharp.Tests.MAUI-Signed.apk +app: ..\Microsoft.ML.OnnxRuntime.Tests.MAUI\bin\Release\net9.0-android\publish\ORT.CSharp.Tests.MAUI-Signed.apk platforms: - platformName: android deviceName: Samsung Galaxy S22 Ultra diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.MAUI/Microsoft.ML.OnnxRuntime.Tests.MAUI.csproj b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.MAUI/Microsoft.ML.OnnxRuntime.Tests.MAUI.csproj index cd50b2a57407f..b181767aaf247 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.MAUI/Microsoft.ML.OnnxRuntime.Tests.MAUI.csproj +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.MAUI/Microsoft.ML.OnnxRuntime.Tests.MAUI.csproj @@ -14,7 +14,7 @@ Disabling those targets until the issues are resolved. --> - net8.0-android + net9.0-android $(TargetFrameworks);net8.0-windows10.0.19041.0