Skip to content

Commit

Permalink
Final cherry pick for rel 0.3.0 (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
baijumeswani authored Jun 19, 2024
1 parent 31f4b1b commit 25f5873
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 40 deletions.
16 changes: 12 additions & 4 deletions .pipelines/stages/jobs/steps/compliant/esrp_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ parameters:

steps:
- ${{ if eq(parameters['DoEsrp'], 'true') }}:
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@5
displayName: ${{ parameters.DisplayName }}
inputs:
ConnectedServiceName: 'OnnxRuntime CodeSign 20190817'
ConnectedServiceName: 'esrp_release'
AppRegistrationClientId: '53d54d02-978d-4305-8572-583cf6711c4f'
AppRegistrationTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
AuthAKVName: 'buildkeyvault'
AuthCertName: '53d54d02-SSL-AutoRotate'
AuthSignCertName: '53d54d02-978d-4305-8572-583cf6711c4f'
FolderPath: ${{ parameters.FolderPath }}
Pattern: '*.nupkg'
SessionTimeout: 90
ServiceEndpointUrl: 'https://api.esrp.microsoft.com/api/v2'
MaxConcurrency: 25
signConfigType: inlineSignParams
inlineOperation: |
[
Expand All @@ -19,13 +27,13 @@ steps:
"operationSetCode": "NuGetSign",
"parameters": [ ],
"toolName": "sign",
"toolVersion": "1.0"
"toolVersion": "6.2.9304.0"
},
{
"keyCode": "CP-401405",
"operationSetCode": "NuGetVerify",
"parameters": [ ],
"toolName": "sign",
"toolVersion": "1.0"
"toolVersion": "6.2.9304.0"
}
]
44 changes: 10 additions & 34 deletions .pipelines/stages/jobs/steps/compliant/win-esrp-dll-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,19 @@ parameters:
default: '*.dll'

steps:
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@5
displayName: ${{ parameters.DisplayName }}
condition: and(succeeded(), eq('${{ parameters.DoEsrp }}', true))
continueOnError: true
inputs:
ConnectedServiceName: 'OnnxRuntime CodeSign 20190817'
ConnectedServiceName: 'esrp_release'
AppRegistrationClientId: '53d54d02-978d-4305-8572-583cf6711c4f'
AppRegistrationTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
AuthAKVName: 'buildkeyvault'
AuthCertName: '53d54d02-SSL-AutoRotate'
AuthSignCertName: '53d54d02-978d-4305-8572-583cf6711c4f'
FolderPath: ${{ parameters.FolderPath }}
Pattern: ${{ parameters.Pattern }}
signConfigType: inlineSignParams
inlineOperation: |
[
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "Microsoft"
},
{
"parameterName": "OpusInfo",
"parameterValue": "http://www.microsoft.com"
},
{
"parameterName": "PageHash",
"parameterValue": "/NPH"
},
{
"parameterName": "FileDigest",
"parameterValue": "/fd sha256"
},
{
"parameterName": "TimeStamp",
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
],
"toolName": "signtool.exe",
"toolVersion": "6.2.9304.0"
}
]
SessionTimeout: 90
ServiceEndpointUrl: 'https://api.esrp.microsoft.com/api/v2'
MaxConcurrency: 25
3 changes: 2 additions & 1 deletion nuget/Microsoft.ML.OnnxRuntimeGenAI.Managed.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
<releaseNotes>Introducing the ONNX Runtime GenAI Library.</releaseNotes>
<tags>ONNX;ONNX Runtime;ONNX Runtime Gen AI;Machine Learning</tags>
<dependencies>
<group targetFramework="net8.0;netstandard2.0" />
<group targetFramework="net8.0" />
<group targetFramework="netstandard2.0" />
</dependencies>
</metadata>
<files>
Expand Down
2 changes: 1 addition & 1 deletion src/models/prompt_image_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ std::unique_ptr<OrtValue> ProcessImagePrompt(const Generators::Tokenizer& tokeni
std::unique_ptr<OrtValue> ProcessPixelValues(ortc::Tensor<float>* pixel_values, ONNXTensorElementDataType expected_type,
Ort::Allocator& allocator) {
if (!(expected_type == ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT || expected_type == ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16)) {
throw std::runtime_error("Expected pixel_values to be of type float or float16. Actual: " + expected_type);
throw std::runtime_error("Expected pixel_values to be of type float or float16. Actual: " + std::to_string(expected_type));
}
auto pixel_values_value = expected_type == ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT
? OrtValue::CreateTensor<float>(allocator, pixel_values->Shape())
Expand Down

0 comments on commit 25f5873

Please sign in to comment.