Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make standalone ort-genai nuget package #320

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 2 additions & 5 deletions .pipelines/stages/jobs/nuget-packaging-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ jobs:
value: ''
${{ if eq(parameters.ep, 'cuda') }}:
value: '.Cuda'
- name: ort_nuget_ext
${{ if eq(parameters.ep, 'cpu') }}:
value: ''
${{ if eq(parameters.ep, 'cuda') }}:
value: '.Gpu'
- name: ortHome
value: 'ort'
workspace:
clean: all
steps:
Expand Down
3 changes: 1 addition & 2 deletions .pipelines/stages/jobs/steps/nuget-win-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ steps:
nuget.exe pack Microsoft.ML.OnnxRuntimeGenAI.nuspec `
-Prop version=$VERSION `
-Prop genai_nuget_ext=$(genai_nuget_ext) `
-Prop ort_nuget_ext=$(ort_nuget_ext) `
-Prop ort_version=$(ort_version) `
-Prop configuration=$(buildConfig) `
-Prop buildPath=$(buildDir)
-Prop ortHome=$(ortHome)
nuget.exe pack Microsoft.ML.OnnxRuntimeGenAI.Managed.nuspec `
-Prop version=$VERSION `
-Prop configuration=$(buildConfig)
Expand Down
10 changes: 9 additions & 1 deletion .pipelines/stages/jobs/steps/utils/download-ort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,12 @@ steps:
Contents: '*tensorrt*'
RemoveSourceFolder: false
displayName: 'Remove tensorrt from lib'
continueOnError: true
continueOnError: true

- task: DeleteFiles@1
inputs:
SourceFolder: '$(Build.Repository.LocalPath)/ort/lib'
Contents: '*.pdb'
RemoveSourceFolder: false
displayName: 'Remove .pdb files from lib'
continueOnError: true
4 changes: 1 addition & 3 deletions nuget/Microsoft.ML.OnnxRuntimeGenAI.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@
<dependencies>
<group targetFramework="NETSTANDARD" >
<dependency id="Microsoft.ML.OnnxRuntimeGenAI.Managed" version="$version$" />
<dependency id="Microsoft.ML.OnnxRuntime$ort_nuget_ext$" version="$ort_version$" />
</group>
<group targetFramework="NETCOREAPP" >
<dependency id="Microsoft.ML.OnnxRuntimeGenAI.Managed" version="$version$" />
<dependency id="Microsoft.ML.OnnxRuntime$ort_nuget_ext$" version="$ort_version$" />
</group>
<group targetFramework="NETFRAMEWORK" >
<dependency id="Microsoft.ML.OnnxRuntimeGenAI.Managed" version="$version$" />
<dependency id="Microsoft.ML.OnnxRuntime$ort_nuget_ext$" version="$ort_version$" />
</group>
</dependencies>
</metadata>
Expand All @@ -37,6 +34,7 @@
<!-- Windows x64 -->
<file src="..\$buildPath$\$configuration$\onnxruntime-genai.lib" target="runtimes\win-x64\native" />
<file src="..\$buildPath$\$configuration$\onnxruntime-genai.dll" target="runtimes\win-x64\native" />
<file src="..\$ortHome$\lib\**" target="runtimes\win-x64\native" />

<!-- --><!-- Windows arm64 -->
<!-- <file src="..\$buildPath$\$configuration$\onnxruntime-genai.lib" target="runtimes\win-arm64\native" /> -->
Expand Down
Loading