Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 7 additions & 6 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -724,12 +724,13 @@ if (onnxruntime_USE_CUDA)
if (WIN32)
link_directories(${onnxruntime_CUDNN_HOME}/lib/x64)

file(GLOB cuda_dll_paths "${onnxruntime_CUDA_HOME}/bin/cublas64_*" "${onnxruntime_CUDA_HOME}/bin/cudart64_*" "${onnxruntime_CUDA_HOME}/bin/curand64_*")
set(onnxruntime_DELAYLOAD_FLAGS "${onnxruntime_DELAYLOAD_FLAGS} /DELAYLOAD:cudnn64_7.dll")
foreach(cuda_dll_path ${cuda_dll_paths})
get_filename_component(cuda_dll_file_name ${cuda_dll_path} NAME)
set(onnxruntime_DELAYLOAD_FLAGS "${onnxruntime_DELAYLOAD_FLAGS} /DELAYLOAD:${cuda_dll_file_name}")
endforeach(cuda_dll_path)
# delayload causes crash on exit, so disable for now
#file(GLOB cuda_dll_paths "${onnxruntime_CUDA_HOME}/bin/cublas64_*" "${onnxruntime_CUDA_HOME}/bin/cudart64_*" "${onnxruntime_CUDA_HOME}/bin/curand64_*")
#set(onnxruntime_DELAYLOAD_FLAGS "${onnxruntime_DELAYLOAD_FLAGS} /DELAYLOAD:cudnn64_7.dll")
#foreach(cuda_dll_path ${cuda_dll_paths})
# get_filename_component(cuda_dll_file_name ${cuda_dll_path} NAME)
# set(onnxruntime_DELAYLOAD_FLAGS "${onnxruntime_DELAYLOAD_FLAGS} /DELAYLOAD:${cuda_dll_file_name}")
#endforeach(cuda_dll_path)

else()
link_directories(${onnxruntime_CUDNN_HOME}/lib64)
Expand Down
9 changes: 9 additions & 0 deletions onnxruntime/test/shared_lib/test_model_loading.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Licensed under the MIT License.

#include "core/session/onnxruntime_cxx_api.h"
#ifdef USE_CUDA
#include "core/providers/cuda/cuda_provider_factory.h"
#endif
#include <fstream>
#include "test_fixture.h"
#include "file_util.h"
Expand All @@ -25,6 +28,12 @@ TEST(CApiTest, model_from_array) {

Ort::SessionOptions so;
Ort::Session session(*ort_env.get(), buffer.data(), buffer.size(), so);

#ifdef USE_CUDA
// test with CUDA provider when using onnxruntime as dll
Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_CUDA(so, 0));
Ort::Session session_cuda(*ort_env.get(), buffer.data(), buffer.size(), so);
#endif
}
} // namespace test
} // namespace onnxruntime
16 changes: 12 additions & 4 deletions tools/ci_build/github/azure-pipelines/templates/win-ci-2019.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
env:
TELEMETRYGUID: $(TELEMETRYGUID)
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
inputs:
versionSpec: '3.7'
addToPath: true
architecture: ${{ parameters.BuildArch }}

- task: BatchScript@1
Expand All @@ -58,7 +58,7 @@ jobs:
workingFolder: '$(Build.BinariesDirectory)'

- script: |
python -m pip install -q pyopenssl setuptools wheel numpy
python -m pip install -q pyopenssl setuptools wheel numpy
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Install python modules'

Expand Down Expand Up @@ -185,6 +185,14 @@ jobs:
artifactName: ${{ parameters.ArtifactName }}
targetPath: '$(Build.ArtifactStagingDirectory)'

- task: PublishSymbols@2
displayName: 'Publish Build Symbols'
condition: eq(variables['IsReleaseBuild'], 'true')
inputs:
symbolsFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
searchPattern: '**/*.pdb'
symbolServerType: teamServices

# Compliance tasks require logs from Debug Build
- ${{ if eq(parameters['DoCompliance'], 'true') }}:
- template: compliance.yml
Expand Down
17 changes: 12 additions & 5 deletions tools/ci_build/github/azure-pipelines/templates/win-ci-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ jobs:
modifyEnvironment: true

- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
inputs:
versionSpec: '3.7'
addToPath: true
architecture: x64

- script: |
python -m pip install -q pyopenssl setuptools wheel numpy
python -m pip install -q pyopenssl setuptools wheel numpy
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Install python modules'

Expand Down Expand Up @@ -112,9 +112,16 @@ jobs:
artifactName: ${{ parameters.ArtifactName }}
targetPath: '$(Build.ArtifactStagingDirectory)'

- task: PublishSymbols@2
displayName: 'Publish Build Symbols'
condition: eq(variables['IsReleaseBuild'], 'true')
inputs:
symbolsFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
searchPattern: '**/*.pdb'
symbolServerType: teamServices

- template: component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'

- template: clean-agent-build-directory-step.yml