mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-29 23:06:41 +00:00
Add TRT header file to ORT GPU nuget package (#8962)
This commit is contained in:
parent
3be96f8a15
commit
0bb56a18cf
3 changed files with 19 additions and 27 deletions
|
|
@ -478,6 +478,12 @@ jobs:
|
|||
arguments: '--configuration RelWithDebInfo -t:CreatePackage -p:Platform="Any CPU" -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Gpu -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'Add TensorRT header file to the native nuGet package'
|
||||
inputs:
|
||||
filename: $(Build.SourcesDirectory)\tools\ci_build\github\windows\bundle_nuget_with_native_headers.bat
|
||||
workingFolder: $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy nuget packages to: $(Build.ArtifactStagingDirectory)'
|
||||
inputs:
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
REM Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
REM Licensed under the MIT License.
|
||||
|
||||
REM for available runtime identifiers, see https://github.com/dotnet/corefx/blob/release/3.1/pkg/Microsoft.NETCore.Platforms/runtime.json
|
||||
set PATH=%CD%;%PATH%
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
FOR /R %%i IN (*.nupkg) do (
|
||||
set filename=%%~ni
|
||||
IF NOT "!filename:~25,7!"=="Managed" (
|
||||
mkdir runtimes\linux-x64\native
|
||||
move onnxruntime-linux-x64-gpu\lib\libonnxruntime_providers_* runtimes\linux-x64\native
|
||||
move onnxruntime-linux-x64-tensorrt\lib\libonnxruntime.so.1* runtimes\linux-x64\native\libonnxruntime.so
|
||||
move onnxruntime-linux-x64-tensorrt\lib\libonnxruntime_providers_shared.so runtimes\linux-x64\native\libonnxruntime_providers_shared.so
|
||||
move onnxruntime-linux-x64-tensorrt\lib\libonnxruntime_providers_tensorrt.so runtimes\linux-x64\native\libonnxruntime_providers_tensorrt.so
|
||||
mkdir runtimes\win-x64\native
|
||||
move onnxruntime-win-x64-tensorrt\lib\onnxruntime_providers_tensorrt.dll runtimes\win-x64\native\onnxruntime_providers_tensorrt.dll
|
||||
move onnxruntime-win-x64-tensorrt\lib\onnxruntime_providers_shared.dll runtimes\win-x64\native\onnxruntime_providers_shared.dll
|
||||
move onnxruntime-win-x64-tensorrt\lib\onnxruntime.dll runtimes\win-x64\native\onnxruntime.dll
|
||||
move onnxruntime-win-x64-tensorrt\lib\onnxruntime.lib runtimes\win-x64\native\onnxruntime.lib
|
||||
move onnxruntime-win-x64-tensorrt\lib\onnxruntime.pdb runtimes\win-x64\native\onnxruntime.pdb
|
||||
7z a %%~ni.nupkg runtimes
|
||||
|
||||
mkdir build\native\include
|
||||
move onnxruntime-linux-x64-tensorrt\include\tensorrt_provider_factory.h build\native\include\tensorrt_provider_factory.h
|
||||
7z a %%~ni.nupkg build
|
||||
)
|
||||
)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
REM Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
REM Licensed under the MIT License.
|
||||
|
||||
set PATH=%CD%;%PATH%
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
FOR /R %%i IN (*.nupkg) do (
|
||||
set filename=%%~ni
|
||||
IF NOT "!filename:~25,7!"=="Managed" (
|
||||
mkdir build\native\include
|
||||
copy %BUILD_SOURCESDIRECTORY%\include\onnxruntime\core\providers\tensorrt\tensorrt_provider_factory.h build\native\include\tensorrt_provider_factory.h
|
||||
7z a %%~ni.nupkg build
|
||||
)
|
||||
)
|
||||
Loading…
Reference in a new issue