mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-08 17:17:15 +00:00
### Description Address build issues and source code discrepancies. Fix cuda_test_provider gtest argument stack corruption. ### Motivation and Context `OpTester` class that is widely used for kernel testing is not suitable for testing internal classes for EPs that are built as shared objects. Currently, CUDA EP tests run only on Linux. We want to enable testing and developments on Windows, and create a usable pattern for testing of other EPs internals. Alternatives considered: Abstracting EP unit tests into separate test executable such as `onnxruntime_test_all`. This alternative was rejected as it would create a lot more changes in the established patterns, and potentially interfere with CUDA functionality with more complex source code maintanence.
118 lines
3.6 KiB
YAML
118 lines
3.6 KiB
YAML
##### start trigger Don't edit it manually, Please do edit set-trigger-rules.py ####
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- main
|
|
- rel-*
|
|
paths:
|
|
exclude:
|
|
- docs/**
|
|
- README.md
|
|
- CONTRIBUTING.md
|
|
- BUILD.md
|
|
- 'js/web'
|
|
- 'onnxruntime/core/providers/js'
|
|
pr:
|
|
branches:
|
|
include:
|
|
- main
|
|
- rel-*
|
|
paths:
|
|
exclude:
|
|
- docs/**
|
|
- README.md
|
|
- CONTRIBUTING.md
|
|
- BUILD.md
|
|
- 'js/web'
|
|
- 'onnxruntime/core/providers/js'
|
|
#### end trigger ####
|
|
|
|
parameters:
|
|
- name: RunOnnxRuntimeTests
|
|
displayName: Run Tests?
|
|
type: boolean
|
|
default: true
|
|
|
|
stages:
|
|
- stage: cuda
|
|
dependsOn: []
|
|
jobs:
|
|
- template: templates/jobs/win-ci-vs-2022-job.yml
|
|
parameters:
|
|
BuildConfig: 'RelWithDebInfo'
|
|
EnvSetupScript: setup_env_cuda.bat
|
|
buildArch: x64
|
|
additionalBuildFlags: >-
|
|
--enable_pybind --build_java --build_nodejs --use_cuda --cuda_home="$(Agent.TempDirectory)\v11.8"
|
|
--enable_cuda_profiling
|
|
--cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
|
|
--cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=ON
|
|
--cmake_extra_defines onnxruntime_ENABLE_CUDA_EP_INTERNAL_TESTS=ON
|
|
msbuildPlatform: x64
|
|
isX86: false
|
|
job_name_suffix: x64_RelWithDebInfo
|
|
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
|
|
ORT_EP_NAME: CUDA
|
|
WITH_CACHE: true
|
|
MachinePool: onnxruntime-Win2022-GPU-A10
|
|
|
|
- stage: training
|
|
dependsOn: []
|
|
jobs:
|
|
- template: templates/jobs/win-ci-vs-2022-job.yml
|
|
parameters:
|
|
BuildConfig: 'RelWithDebInfo'
|
|
EnvSetupScript: setup_env_cuda.bat
|
|
buildArch: x64
|
|
additionalBuildFlags: >-
|
|
--enable_pybind --enable_training --use_cuda --cuda_home="$(Agent.TempDirectory)\v11.8"
|
|
--skip_onnx_tests
|
|
--cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
|
|
msbuildPlatform: x64
|
|
isX86: false
|
|
job_name_suffix: x64_RelWithDebInfo
|
|
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
|
|
ORT_EP_NAME: CUDA
|
|
WITH_CACHE: true
|
|
MachinePool: onnxruntime-Win2022-GPU-A10
|
|
isTraining: true
|
|
|
|
- stage: dml
|
|
dependsOn: []
|
|
jobs:
|
|
- template: templates/jobs/win-ci-vs-2022-job.yml
|
|
parameters:
|
|
BuildConfig: 'RelWithDebInfo'
|
|
EnvSetupScript: setup_env.bat
|
|
buildArch: x64
|
|
additionalBuildFlags: --enable_pybind --use_dml --enable_wcos --use_winml
|
|
msbuildPlatform: x64
|
|
isX86: false
|
|
job_name_suffix: x64_RelWithDebInfo
|
|
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
|
|
ORT_EP_NAME: DML
|
|
WITH_CACHE: false
|
|
MachinePool: onnxruntime-Win2022-GPU-dml-A10
|
|
|
|
- stage: kernelDocumentation
|
|
dependsOn: []
|
|
jobs:
|
|
- template: templates/jobs/win-ci-vs-2022-job.yml
|
|
parameters:
|
|
BuildConfig: 'RelWithDebInfo'
|
|
EnvSetupScript: setup_env_cuda.bat
|
|
buildArch: x64
|
|
# note: need to specify `--gen_doc` when creating the build config so it has to be in additionalBuildFlags
|
|
additionalBuildFlags: >-
|
|
--gen_doc validate --skip_tests --enable_pybind --use_dml --use_cuda
|
|
--cuda_home="$(Agent.TempDirectory)\v11.8"
|
|
--cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
|
|
--cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF
|
|
msbuildPlatform: x64
|
|
isX86: false
|
|
job_name_suffix: x64_RelWithDebInfo
|
|
RunOnnxRuntimeTests: false
|
|
GenerateDocumentation: true
|
|
ORT_EP_NAME: CUDA # It doesn't really matter which EP is selected here since this stage is for documentation.
|
|
WITH_CACHE: true
|
|
MachinePool: onnxruntime-Win2022-GPU-A10
|