Skip to content

Commit

Permalink
added in win-arm64 (#6813)
Browse files Browse the repository at this point in the history
* added in win-arm64

* fixed MKL arm64 cmake issue

* right helix queue

* added in win-arm64

* fixed MKL arm64 cmake issue

* right helix queue

* fixing arm tests

* makes x64 test detection better

* change test label

* fixed onnx files not being included

* added new win-arm baselines

* baseline changes

* fixed build issue

* fixed test

* one more basleine

* fixed pack for mkl redist

* .NET update
  • Loading branch information
michaelgsharp committed Nov 21, 2023
1 parent aeb1ab8 commit db08da6
Show file tree
Hide file tree
Showing 145 changed files with 29,630 additions and 11 deletions.
27 changes: 25 additions & 2 deletions .vsts-dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,30 @@ jobs:

- template: /build/ci/job-template.yml
parameters:
name: Windows_x64_Net60
architecture: arm64
name: Windows_cross_arm64_Net6
buildScript: build.cmd
customMatrixes:
Debug_Build:
_configuration: Debug
_config_short: DI
_includeBenchmarkData: false
_targetFramework: net6.0
Release_Build:
_configuration: Release
_config_short: RI
_includeBenchmarkData: false
_targetFramework: net6.0
innerLoop: true
vsTestConfiguration: "/Framework:.NETCoreApp,Version=v6.0"
pool:
name: NetCore-Public
demands: ImageOverride -equals 1es-windows-2019-open
helixQueue: windows.11.arm64.open

- template: /build/ci/job-template.yml
parameters:
name: Windows_x64_Net6
buildScript: build.cmd
innerLoop: true
vsTestConfiguration: "/Framework:.NETCoreApp,Version=v3.1"
Expand Down Expand Up @@ -164,7 +187,7 @@ jobs:

- template: /build/ci/job-template.yml
parameters:
name: Windows_x86_Net60
name: Windows_x86_Net6
architecture: x86
buildScript: build.cmd
innerLoop: true
Expand Down
30 changes: 27 additions & 3 deletions build/vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ stages:
displayName: Build Native Assets

- task: PublishBuildArtifacts@1
displayName: Publish Linux package assets
displayName: Publish Linux_arm package assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets
artifactName: pkgassets
Expand All @@ -86,7 +86,7 @@ stages:
displayName: Build Native Assets

- task: PublishBuildArtifacts@1
displayName: Publish Linux package assets
displayName: Publish Linux_arm64 package assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets
artifactName: pkgassets
Expand Down Expand Up @@ -133,14 +133,38 @@ stages:
displayName: Build Native Assets

- task: PublishBuildArtifacts@1
displayName: Publish macOS package assets
displayName: Publish macOS_M1 package assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets
artifactName: pkgassets
artifactType: container

- template: /eng/common/templates/steps/generate-sbom.yml

################################################################################
- job: Windows_arm64
################################################################################
pool:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals windows.vs2019.amd64
steps:
# Only build native assets to avoid conflicts.
- script: ./build.cmd -projects $(Build.SourcesDirectory)/src/Native/Native.proj -configuration $(BuildConfig) /p:TargetArchitecture=arm64 /p:CopyPackageAssets=true
displayName: Build Native Assets

- task: PublishBuildArtifacts@1
displayName: Publish Windows_arm64 package assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets
artifactName: pkgassets
artifactType: container

- template: /eng/common/templates/steps/generate-sbom.yml

# Terminate all dotnet build processes.
- script: $(Build.SourcesDirectory)/.dotnet/dotnet.exe build-server shutdown
displayName: Dotnet Server Shutdown

################################################################################
- job: Windows_x86
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<ApprovalTestsVersion>5.4.7</ApprovalTestsVersion>
<BenchmarkDotNetVersion>0.13.1</BenchmarkDotNetVersion>
<DotNetRuntime60Version>6.0.9</DotNetRuntime60Version>
<DotNetRuntime80Version>8.0.0-preview.3.23174.8</DotNetRuntime80Version>
<DotNetRuntime80Version>8.0.0</DotNetRuntime80Version>
<FluentAssertionVersion>5.10.2</FluentAssertionVersion>
<MicrosoftCodeAnalysisTestingVersion>1.1.2-beta1.23431.1</MicrosoftCodeAnalysisTestingVersion>
<MicrosoftDotNetXUnitExtensionsVersion>8.0.0-beta.23265.1</MicrosoftDotNetXUnitExtensionsVersion>
Expand Down
8 changes: 8 additions & 0 deletions eng/pkg/CommonPackage.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@
<Visible>false</Visible>
<Link>%(Filename)%(Extension)</Link>
</Content>

<Content Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\*.dll"
Condition="'$(PlatformTarget)' == 'x86'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
<Link>%(Filename)%(Extension)</Link>
</Content>

<Content Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-arm64\native\*.dll"
Condition="'$(PlatformTarget)' == 'arm64'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
<Link>%(Filename)%(Extension)</Link>
</Content>
</ItemGroup>

</Project>
9 changes: 9 additions & 0 deletions eng/pkg/Pack.props
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,21 @@
<Visible>false</Visible>
<Link>%(Filename)%(Extension)</Link>
</Content>

<Content Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-x86\native\*.dll"
Condition="'$(PlatformTarget)' == 'x86'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
<Link>%(Filename)%(Extension)</Link>
</Content>

<Content Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-arm64\native\*.dll"
Condition="'$(PlatformTarget)' == 'arm64'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
<Link>%(Filename)%(Extension)</Link>
</Content>

</ItemGroup>

<!-- Work around https://github.com/NuGet/Home/issues/6091 -->
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.ML.AutoML/Microsoft.ML.AutoML.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<!--The path needed to be hardcoded for this to work on our publishing CI-->
<BuildOutputInPackage Condition="Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x86\native\LdaNative.pdb')" Include="$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x86\native\LdaNative.pdb" TargetPath="..\..\runtimes\win-x86\native" />
<BuildOutputInPackage Condition="Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x64\native\LdaNative.pdb')" Include="$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x64\native\LdaNative.pdb" TargetPath="..\..\runtimes\win-x64\native" />
<BuildOutputInPackage Condition="Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-arm64\native\LdaNative.pdb')" Include="$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-arm64\native\LdaNative.pdb" TargetPath="..\..\runtimes\win-arm64\native"/>
</ItemGroup>
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
<Visible>false</Visible>
<Link>%(Filename)%(Extension)</Link>
</Content>

<Content Include="$(MSBuildThisFileDirectory)\..\..\runtimes\win-arm64\nativeassets\netstandard2.0\*.dll"
Condition="'$(PlatformTarget)' == 'arm64'">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
<Link>%(Filename)%(Extension)</Link>
</Content>
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions src/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<PackageLicenseExpression></PackageLicenseExpression>
<PackageDescription>$(MSBuildProjectName) contains the MKL library redistributed as a NuGet package.</PackageDescription>
<PackageTags>$(PackageTags) MLNET MKL</PackageTags>
<!-- No native dependencies on arm so causes nuget package failure -->
<IsPackable Condition="'$(TargetArchitecture)' == 'arm64' Or '$(TargetArchitecture)' == 'arm'">false</IsPackable>
<!-- Empty package with no managed dependencies, only native, so no need to warn for empty lib folder/dependencies -->
<NoWarn>$(NoWarn);NU5127;NU5128</NoWarn>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<!--The path needed to be hardcoded for this to work on our publishing CI-->
<BuildOutputInPackage Condition="Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x86\native\MatrixFactorizationNative.pdb')" Include="$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x86\native\MatrixFactorizationNative.pdb" TargetPath="..\..\runtimes\win-x86\native"/>
<BuildOutputInPackage Condition="Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x64\native\MatrixFactorizationNative.pdb')" Include="$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x64\native\MatrixFactorizationNative.pdb" TargetPath="..\..\runtimes\win-x64\native"/>
<BuildOutputInPackage Condition="Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-arm64\native\MatrixFactorizationNative.pdb')" Include="$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-arm64\native\MatrixFactorizationNative.pdb" TargetPath="..\..\runtimes\win-arm64\native"/>
</ItemGroup>
</Target>
</Project>
1 change: 1 addition & 0 deletions src/Microsoft.ML/Microsoft.ML.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<!--The path needed to be hardcoded for this to work on our publishing CI-->
<BuildOutputInPackage Condition="Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x86\native\LdaNative.pdb')" Include="$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x86\native\LdaNative.pdb" TargetPath="..\..\runtimes\win-x86\native"/>
<BuildOutputInPackage Condition="Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x64\native\LdaNative.pdb')" Include="$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-x64\native\LdaNative.pdb" TargetPath="..\..\runtimes\win-x64\native"/>
<BuildOutputInPackage Condition="Exists('$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-arm64\native\LdaNative.pdb')" Include="$(PackageAssetsPath)$(PackageIdFolderName)\runtimes\win-arm64\native\LdaNative.pdb" TargetPath="..\..\runtimes\win-arm64\native"/>
</ItemGroup>
</Target>
</Project>
3 changes: 3 additions & 0 deletions src/Native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ else()
if (DEFINED ONEDAL_DEVEL_PATH)
message("Path to OneDal library defined [${ONEDAL_DEVEL_PATH}] but it is not being built on this arch.")
endif()
if (DEFINED MKL_LIB_PATH)
message("Path to Intel MKL library defined [${MKL_LIB_PATH}] but it is not being built on this arch.")
endif()
endif()

add_subdirectory(LdaNative)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
maml.exe CV tr=AveragedPerceptron{lr=0.01 iter=100 lazy+} threads=- dout=%Output% data=%Data% seed=1
Automatically adding a MinMax normalization transform, use 'norm=Warn' or 'norm=No' to turn this behavior off.
Warning: Skipped 800 instances with missing features during training (over 100 iterations; 8 inst/iter)
Training calibrator.
Automatically adding a MinMax normalization transform, use 'norm=Warn' or 'norm=No' to turn this behavior off.
Warning: Skipped 800 instances with missing features during training (over 100 iterations; 8 inst/iter)
Training calibrator.
Warning: The predictor produced non-finite prediction values on 8 instances during testing. Possible causes: abnormal data or the predictor is numerically unstable.
TEST POSITIVE RATIO: 0.3785 (134.0/(134.0+220.0))
Confusion table
||======================
PREDICTED || positive | negative | Recall
TRUTH ||======================
positive || 132 | 2 | 0.9851
negative || 8 | 212 | 0.9636
||======================
Precision || 0.9429 | 0.9907 |
OVERALL 0/1 ACCURACY: 0.971751
LOG LOSS/instance: 0.136411
Test-set entropy (prior Log-Loss/instance): 0.956998
LOG-LOSS REDUCTION (RIG): 0.857460
AUC: 0.994199
Warning: The predictor produced non-finite prediction values on 8 instances during testing. Possible causes: abnormal data or the predictor is numerically unstable.
TEST POSITIVE RATIO: 0.3191 (105.0/(105.0+224.0))
Confusion table
||======================
PREDICTED || positive | negative | Recall
TRUTH ||======================
positive || 98 | 7 | 0.9333
negative || 3 | 221 | 0.9866
||======================
Precision || 0.9703 | 0.9693 |
OVERALL 0/1 ACCURACY: 0.969605
LOG LOSS/instance: 0.118826
Test-set entropy (prior Log-Loss/instance): 0.903454
LOG-LOSS REDUCTION (RIG): 0.868476
AUC: 0.997577

OVERALL RESULTS
---------------------------------------
AUC: 0.995888 (0.0017)
Accuracy: 0.970678 (0.0011)
Positive precision: 0.956577 (0.0137)
Positive recall: 0.959204 (0.0259)
Negative precision: 0.979976 (0.0107)
Negative recall: 0.975122 (0.0115)
Log-loss: 0.127618 (0.0088)
Log-loss reduction: 0.862968 (0.0055)
F1 Score: 0.957480 (0.0060)
AUPRC: 0.992003 (0.0026)

---------------------------------------
Physical memory usage(MB): %Number%
Virtual memory usage(MB): %Number%
%DateTime% Time elapsed(s): %Number%

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
AveragedPerceptron
AUC Accuracy Positive precision Positive recall Negative precision Negative recall Log-loss Log-loss reduction F1 Score AUPRC /lr /iter Learner Name Train Dataset Test Dataset Results File Run Time Physical Memory Virtual Memory Command Line Settings
0.995888 0.970678 0.956577 0.959204 0.979976 0.975122 0.127618 0.862968 0.95748 0.992003 0.01 100 AveragedPerceptron %Data% %Output% 99 0 0 maml.exe CV tr=AveragedPerceptron{lr=0.01 iter=100 lazy+} threads=- dout=%Output% data=%Data% seed=1 /lr:0.01;/iter:100

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
maml.exe CV tr=AveragedPerceptron threads=- cali=PAV dout=%Output% data=%Data% seed=1
Automatically adding a MinMax normalization transform, use 'norm=Warn' or 'norm=No' to turn this behavior off.
Warning: Skipped 80 instances with missing features during training (over 10 iterations; 8 inst/iter)
Training calibrator.
PAV calibrator: piecewise function approximation has 5 components.
Automatically adding a MinMax normalization transform, use 'norm=Warn' or 'norm=No' to turn this behavior off.
Warning: Skipped 80 instances with missing features during training (over 10 iterations; 8 inst/iter)
Training calibrator.
PAV calibrator: piecewise function approximation has 6 components.
Warning: The predictor produced non-finite prediction values on 8 instances during testing. Possible causes: abnormal data or the predictor is numerically unstable.
TEST POSITIVE RATIO: 0.3785 (134.0/(134.0+220.0))
Confusion table
||======================
PREDICTED || positive | negative | Recall
TRUTH ||======================
positive || 133 | 1 | 0.9925
negative || 9 | 211 | 0.9591
||======================
Precision || 0.9366 | 0.9953 |
OVERALL 0/1 ACCURACY: 0.971751
LOG LOSS/instance: Infinity
Test-set entropy (prior Log-Loss/instance): 0.956998
LOG-LOSS REDUCTION (RIG): -Infinity
AUC: 0.994403
Warning: The predictor produced non-finite prediction values on 8 instances during testing. Possible causes: abnormal data or the predictor is numerically unstable.
TEST POSITIVE RATIO: 0.3191 (105.0/(105.0+224.0))
Confusion table
||======================
PREDICTED || positive | negative | Recall
TRUTH ||======================
positive || 100 | 5 | 0.9524
negative || 3 | 221 | 0.9866
||======================
Precision || 0.9709 | 0.9779 |
OVERALL 0/1 ACCURACY: 0.975684
LOG LOSS/instance: 0.227705
Test-set entropy (prior Log-Loss/instance): 0.903454
LOG-LOSS REDUCTION (RIG): 0.747961
AUC: 0.997619

OVERALL RESULTS
---------------------------------------
AUC: 0.996011 (0.0016)
Accuracy: 0.973718 (0.0020)
Positive precision: 0.953747 (0.0171)
Positive recall: 0.972459 (0.0201)
Negative precision: 0.986580 (0.0087)
Negative recall: 0.972849 (0.0138)
Log-loss: Infinity (NaN)
Log-loss reduction: -Infinity (NaN)
F1 Score: 0.962653 (0.0011)
AUPRC: 0.992269 (0.0025)

---------------------------------------
Physical memory usage(MB): %Number%
Virtual memory usage(MB): %Number%
%DateTime% Time elapsed(s): %Number%

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
AveragedPerceptron
AUC Accuracy Positive precision Positive recall Negative precision Negative recall Log-loss Log-loss reduction F1 Score AUPRC Learner Name Train Dataset Test Dataset Results File Run Time Physical Memory Virtual Memory Command Line Settings
0.996011 0.973718 0.953747 0.972459 0.98658 0.972849 Infinity -Infinity 0.962653 0.992269 AveragedPerceptron %Data% %Output% 99 0 0 maml.exe CV tr=AveragedPerceptron threads=- cali=PAV dout=%Output% data=%Data% seed=1

0 comments on commit db08da6

Please sign in to comment.