mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-02 03:55:34 +00:00
Merge CPU/GPU nuget pipeline. The old GPU nuget pipeline will be only for DML. TODO: the result GPU package contains PDB files for some of the DLLs, but not all. It is due to the refactoring of CUDA EP to pluggable DLLs. At that time we forgot to copy the PDB files. However, I can't add them in now. Because currently the package is already 220MB large. If the missed PDB files were added, then it will be oversize. nuget.org doesn't accept >250MB packages.
58 lines
2.1 KiB
Batchfile
Executable file
58 lines
2.1 KiB
Batchfile
Executable file
REM Copyright (c) Microsoft Corporation. All rights reserved.
|
|
REM Licensed under the MIT License.
|
|
|
|
@ECHO ON
|
|
SETLOCAL EnableDelayedExpansion
|
|
|
|
SET TargetFramework=netcoreapp2.1
|
|
SET TargetArch=x64
|
|
SET dn="C:\Program Files\dotnet\dotnet"
|
|
|
|
SET LocalNuGetRepo=%1
|
|
IF NOT "%2"=="" (SET TargetFramework=%2)
|
|
IF NOT "%3"=="" (SET TargetArch=%3)
|
|
IF NOT "%4"=="" (
|
|
SET CurrentOnnxRuntimeVersion=%4
|
|
) ELSE (
|
|
echo "Usage: runtest.bat LocalNuGetRepoPath TargetFramework TargetArch NuGetPackageVersion"
|
|
)
|
|
|
|
IF "%TargetArch%"=="x64" (
|
|
SET RuntimeIdentifier=win-x64
|
|
SET PlatformTarget=x64
|
|
)
|
|
|
|
IF "%TargetArch%"=="x86" (
|
|
SET dn="C:\Program Files (x86)\dotnet\dotnet"
|
|
SET RuntimeIdentifier=win-x86
|
|
SET PlatformTarget=x86
|
|
)
|
|
|
|
ECHO Target Framework is %TargetFramework%
|
|
|
|
REM Update if CUDA lib paths if set
|
|
SET PATH=%CUDA_PATH%\bin;%CUDNN_PATH%\bin;%PATH%
|
|
|
|
IF EXIST test\Microsoft.ML.OnnxRuntime.EndToEndTests\packages RMDIR /S /Q test\Microsoft.ML.OnnxRuntime.EndToEndTests\packages
|
|
IF EXIST test\Microsoft.ML.OnnxRuntime.EndToEndTests\bin RMDIR /S /Q test\Microsoft.ML.OnnxRuntime.EndToEndTests\bin
|
|
IF EXIST test\Microsoft.ML.OnnxRuntime.EndToEndTests\obj RMDIR /S /Q test\Microsoft.ML.OnnxRuntime.EndToEndTests\obj
|
|
|
|
@echo %CurrentOnnxRuntimeVersion%
|
|
%dn% clean test\Microsoft.ML.OnnxRuntime.EndToEndTests\Microsoft.ML.OnnxRuntime.EndToEndTests.csproj
|
|
%dn% restore -v detailed test\Microsoft.ML.OnnxRuntime.EndToEndTests\Microsoft.ML.OnnxRuntime.EndToEndTests.csproj --configfile .\Nuget.CSharp.config --no-cache --packages test\Microsoft.ML.OnnxRuntime.EndToEndTests\packages --source https://api.nuget.org/v3/index.json --source %LocalNuGetRepo%
|
|
|
|
IF NOT errorlevel 0 (
|
|
@echo "Failed to restore nuget packages for the test project"
|
|
EXIT 1
|
|
)
|
|
|
|
IF "%PACKAGENAME%"=="Microsoft.ML.OnnxRuntime.Gpu" (
|
|
set TESTONGPU=ON
|
|
%dn% test -p:DefineConstants=USE_CUDA test\Microsoft.ML.OnnxRuntime.EndToEndTests\Microsoft.ML.OnnxRuntime.EndToEndTests.csproj --no-restore
|
|
) ELSE (
|
|
%dn% test test\Microsoft.ML.OnnxRuntime.EndToEndTests\Microsoft.ML.OnnxRuntime.EndToEndTests.csproj --no-restore
|
|
)
|
|
IF NOT errorlevel 0 (
|
|
@echo "Failed to build or execute the end-to-end test"
|
|
EXIT 1
|
|
)
|