Add different pgo data runs (#52780)
authorDrew Scoggins <anscoggi@microsoft.com>
Wed, 26 May 2021 17:52:41 +0000 (10:52 -0700)
committerGitHub <noreply@github.com>
Wed, 26 May 2021 17:52:41 +0000 (10:52 -0700)
* Add different pgo data runs

* Fix if else formatting

* Update log artifact name

* Turn off failing tests for these runs

* Remove filter

* Fix config order

* Remove testing comments

eng/pipelines/coreclr/perf.yml
eng/pipelines/coreclr/templates/perf-job.yml
eng/pipelines/coreclr/templates/run-performance-job.yml
eng/testing/performance/performance-setup.ps1

index 2f71e62..e9f00c9 100644 (file)
@@ -291,6 +291,55 @@ jobs:
         runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
         logicalmachine: 'perftiger'
 
+# run coreclr perftiger microbenchmarks pgo perf jobs
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - windows_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: microbenchmarks.proj
+        runKind: micro
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
+        pgoRunType: -NoPgo
+
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - windows_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: microbenchmarks.proj
+        runKind: micro
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
+        pgoRunType: -DynamicPgo
+
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - windows_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: microbenchmarks.proj
+        runKind: micro
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
+        pgoRunType: -FullPgo
+
   # run coreclr perfowl microbenchmarks perf job
   - template: /eng/pipelines/common/platform-matrix.yml
     parameters:
index 590806f..671d9d9 100644 (file)
@@ -16,6 +16,7 @@ parameters:
   runJobTemplate: '/eng/pipelines/coreclr/templates/run-performance-job.yml'
   additionalSetupParameters: ''
   logicalMachine: ''
+  pgoRunType: ''
 
 ### Perf job
 
@@ -26,8 +27,8 @@ jobs:
 - template: ${{ parameters.runJobTemplate }}
   parameters:
     # Compute job name from template parameters
-    jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine) }}
-    displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine) }}
+    jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.pgoRunType) }}
+    displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.pgoRunType) }}
     pool: ${{ parameters.pool }}
     buildConfig: ${{ parameters.buildConfig }}
     archType: ${{ parameters.archType }}
@@ -42,6 +43,7 @@ jobs:
     additionalSetupParameters: ${{ parameters.additionalSetupParameters }}
     container: ${{ parameters.container }}
     logicalmachine: ${{ parameters.logicalmachine }}
+    pgoRunType: ${{ parameters.pgoRunType }}
     # Test job depends on the corresponding build job
     dependsOn:
     - ${{ if ne(parameters.runtimeType, 'AndroidMono')}}:
index 1de4d30..12a8ea6 100644 (file)
@@ -16,11 +16,12 @@ parameters:
   timeoutInMinutes: 320           # optional -- timeout for the job
   enableTelemetry: false          # optional -- enable for telemetry
   liveLibrariesBuildConfig: ''    # optional -- live-live libraries configuration to use for the run
+  pgoRunType: ''                  # optional -- Flag for running with no pgo, dynamic pgo, or full pgo
   runtimeType: 'coreclr'          # optional -- Sets the runtime as coreclr or mono
   codeGenType: 'JIT'              # optional -- Decides on the codegen technology if running on mono
   projectFile: 'microbenchmarks.proj'   # optional -- project file to build helix workitems
   runKind: ''                     # required -- test category
-  logicalMachine: ''                       # required -- Used to specify a which pool of machines the test should run against
+  logicalMachine: ''              # required -- Used to specify a which pool of machines the test should run against
 jobs:
 - template: xplat-pipeline-job.yml
   parameters:
@@ -111,7 +112,7 @@ jobs:
             _Framework: ${{ framework }}
     steps:
     - ${{ parameters.steps }}
-    - powershell: $(Build.SourcesDirectory)\eng\testing\performance\performance-setup.ps1 $(IsInternal)$(Interpreter) -Framework $(_Framework) -Kind ${{ parameters.runKind }} -LogicalMachine ${{ parameters.logicalMachine }} ${{ parameters.extraSetupParameters }}
+    - powershell: $(Build.SourcesDirectory)\eng\testing\performance\performance-setup.ps1 $(IsInternal)$(Interpreter) -Framework $(_Framework) -Kind ${{ parameters.runKind }} -LogicalMachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} ${{ parameters.extraSetupParameters }}
       displayName: Performance Setup (Windows)
       condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
       continueOnError: ${{ parameters.continueOnError }}
@@ -139,6 +140,6 @@ jobs:
       displayName: Publish Logs
       inputs:
         targetPath: $(Build.SourcesDirectory)/artifacts/log
-        artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_${{ parameters.logicalMachine }}'
+        artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_${{ parameters.logicalMachine }}_${{ parameters.pgoRunType }}'
       continueOnError: true
       condition: always()
index 8ac0d95..92db27f 100644 (file)
@@ -20,7 +20,10 @@ Param(
     [string] $MonoDotnet="",
     [string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind",
     [string] $LogicalMachine="",
-    [switch] $AndroidMono
+    [switch] $AndroidMono,
+    [switch] $NoPGO,
+    [switch] $DynamicPGO,
+    [switch] $FullPGO
 )
 
 $RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
@@ -74,10 +77,36 @@ if($MonoDotnet -ne "")
     }
 }
 
+if($NoPGO)
+{
+    $Configurations += " PGOType=nopgo"
+}
+elseif($DynamicPGO)
+{
+    $Configurations += " PGOType=dynamicpgo"
+}
+elseif($FullPGO)
+{
+    $Configurations += " PGOType=fullpgo"
+    $ExtraBenchmarkDotNetArguments = "--category-exclusion-filter NoAOT"
+}
+
 # FIX ME: This is a workaround until we get this from the actual pipeline
 $CommonSetupArguments="--channel main --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture"
 $SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
 
+if($NoPGO)
+{
+    $SetupArguments = "$SetupArguments --no-pgo"
+}
+elseif($DynamicPGO)
+{
+    $SetupArguments = "$SetupArguments --dynamic-pgo"
+}
+elseif($FullPGO)
+{
+    $SetupArguments = "$SetupArguments --full-pgo"
+}
 
 if ($RunFromPerformanceRepo) {
     $SetupArguments = "--perf-hash $CommitSha $CommonSetupArguments"