Skip to content

Commit

Permalink
Setup for runs with physical promotion. (#87227)
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet authored Jun 8, 2023
1 parent 7c00b17 commit 0eb7121
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 20 deletions.
17 changes: 17 additions & 0 deletions eng/pipelines/coreclr/perf-non-wasm-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,23 @@ jobs:
logicalmachine: 'perftiger'
pgoRunType: --nodynamicpgo

# run coreclr perftiger microbenchmarks physical promotion 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'
physicalPromotionRunType: -PhysicalPromotion

# run coreclr perfowl microbenchmarks perf job
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
Expand Down
6 changes: 4 additions & 2 deletions eng/pipelines/coreclr/templates/perf-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ parameters:
additionalSetupParameters: ''
logicalMachine: ''
pgoRunType: ''
physicalPromotionRunType: ''
javascriptEngine: 'NoJS'
iOSLlvmBuild: 'False'
iOSStripSymbols: 'False'
Expand All @@ -38,8 +39,8 @@ jobs:
- template: ${{ parameters.runJobTemplate }}
parameters:
# Compute job name from template parameters
jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}_{11}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }}
displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }}
jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}_{11}_{12}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.physicalPromotionRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }}
displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.physicalPromotionRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }}
pool: ${{ parameters.pool }}
buildConfig: ${{ parameters.buildConfig }}
archType: ${{ parameters.archType }}
Expand All @@ -55,6 +56,7 @@ jobs:
container: ${{ parameters.container }}
logicalmachine: ${{ parameters.logicalmachine }}
pgoRunType: ${{ parameters.pgoRunType }}
physicalPromotionRunType: ${{ parameters.physicalPromotionRunType }}
javascriptEngine: ${{ parameters.javascriptEngine }}
iosLlvmBuild: ${{ parameters.iosLlvmBuild }}
iosStripSymbols: ${{ parameters.iosStripSymbols }}
Expand Down
9 changes: 5 additions & 4 deletions eng/pipelines/coreclr/templates/run-performance-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ 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
pgoRunType: '' # optional -- different PGO configurations
physicalPromotionRunType: '' # optional -- different physical promotion configurations
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
Expand Down Expand Up @@ -153,11 +154,11 @@ 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.pgoRunType }} -UseLocalCommitTime ${{ parameters.extraSetupParameters }}
- powershell: $(Build.SourcesDirectory)\eng\testing\performance\performance-setup.ps1 $(IsInternal)$(Interpreter) -Framework $(_Framework) -Kind ${{ parameters.runKind }} -LogicalMachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} ${{ parameters.physicalPromotionRunType }} -UseLocalCommitTime ${{ parameters.extraSetupParameters }}
displayName: Performance Setup (Windows)
condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
continueOnError: ${{ parameters.continueOnError }}
- script: $(Build.SourcesDirectory)/eng/testing/performance/performance-setup.sh $(IsInternal)$(Interpreter) --framework $(_Framework) --kind ${{ parameters.runKind }} --logicalmachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} --uselocalcommittime ${{ parameters.extraSetupParameters }}
- script: $(Build.SourcesDirectory)/eng/testing/performance/performance-setup.sh $(IsInternal)$(Interpreter) --framework $(_Framework) --kind ${{ parameters.runKind }} --logicalmachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} ${{ parameters.physicalPromotionRunType }} --uselocalcommittime ${{ parameters.extraSetupParameters }}
displayName: Performance Setup (Unix)
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
continueOnError: ${{ parameters.continueOnError }}
Expand All @@ -182,6 +183,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 }}_${{ parameters.javascriptEngine }}_${{ parameters.pgoRunType }}'
artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_${{ parameters.logicalMachine }}_${{ parameters.javascriptEngine }}_${{ parameters.pgoRunType }}_${{ parameters.physicalPromotionRunType }}'
continueOnError: true
condition: always()
30 changes: 16 additions & 14 deletions eng/testing/performance/performance-setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Param(
[switch] $iOSMono,
[switch] $iOSNativeAOT,
[switch] $NoDynamicPGO,
[switch] $PhysicalPromotion,
[switch] $iOSLlvmBuild,
[switch] $iOSStripSymbols,
[string] $MauiVersion,
Expand Down Expand Up @@ -63,13 +64,11 @@ else {
$Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open"
}

if($MonoInterpreter)
{
if ($MonoInterpreter) {
$ExtraBenchmarkDotNetArguments = "--category-exclusion-filter NoInterpreter"
}

if($MonoDotnet -ne "")
{
if ($MonoDotnet -ne "") {
$Configurations += " LLVM=$LLVM MonoInterpreter=$MonoInterpreter MonoAOT=$MonoAOT"
if($ExtraBenchmarkDotNetArguments -eq "")
{
Expand All @@ -83,11 +82,14 @@ if($MonoDotnet -ne "")
}
}

if($NoDynamicPGO)
{
if ($NoDynamicPGO) {
$Configurations += " PGOType=nodynamicpgo"
}

if ($PhysicalPromotion) {
$Configurations += " PhysicalPromotionType=physicalpromotion"
}

if ($iOSMono) {
$Configurations += " iOSLlvmBuild=$iOSLlvmBuild"
$Configurations += " iOSStripSymbols=$iOSStripSymbols"
Expand All @@ -106,13 +108,15 @@ if($Branch.Contains("refs/heads/release"))
$CommonSetupArguments="--channel $CleanedBranchName --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($NoDynamicPGO)
{
if ($NoDynamicPGO) {
$SetupArguments = "$SetupArguments --no-dynamic-pgo"
}

if($UseLocalCommitTime)
{
if ($PhysicalPromotion) {
$SetupArguments = "$SetupArguments --physical-promotion"
}

if ($UseLocalCommitTime) {
$LocalCommitTime = (git show -s --format=%ci $CommitSha)
$SetupArguments = "$SetupArguments --commit-time `"$LocalCommitTime`""
}
Expand All @@ -126,8 +130,7 @@ else {
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance $PerformanceDirectory
}

if($MonoDotnet -ne "")
{
if ($MonoDotnet -ne "") {
$UsingMono = "true"
$MonoDotnetPath = (Join-Path $PayloadDirectory "dotnet-mono")
Move-Item -Path $MonoDotnet -Destination $MonoDotnetPath
Expand All @@ -142,8 +145,7 @@ if ($UseBaselineCoreRun) {
Move-Item -Path $BaselineCoreRootDirectory -Destination $NewBaselineCoreRoot
}

if($MauiVersion -ne "")
{
if ($MauiVersion -ne "") {
$SetupArguments = "$SetupArguments --maui-version $MauiVersion"
}

Expand Down
13 changes: 13 additions & 0 deletions eng/testing/performance/performance-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ while (($# > 0)); do
nodynamicpgo=true
shift 1
;;
--physicalpromotion)
physicalpromotion=true
shift 1
;;
--compare)
compare=true
shift 1
Expand Down Expand Up @@ -231,6 +235,7 @@ while (($# > 0)); do
echo " --mauiversion Set the maui version for Mono/Maui runs"
echo " --uselocalcommittime Pass local runtime commit time to the setup script"
echo " --nodynamicpgo Set for No dynamic PGO runs"
echo " --physicalpromotion Set for runs with physical promotion"
echo ""
exit 1
;;
Expand Down Expand Up @@ -347,6 +352,10 @@ if [[ "$nodynamicpgo" == "true" ]]; then
configurations="$configurations PGOType=nodynamicpgo"
fi

if [[ "$physicalpromotion" == "true" ]]; then
configurations="$configurations PhysicalPromotionType=physicalpromotion"
fi



cleaned_branch_name="main"
Expand Down Expand Up @@ -415,6 +424,10 @@ if [[ "$nodynamicpgo" == "true" ]]; then
setup_arguments="$setup_arguments --no-dynamic-pgo"
fi

if [[ "$physicalpromotion" == "true" ]]; then
setup_arguments="$setup_arguments --physical-promotion"
fi

if [[ "$monoaot" == "true" ]]; then
monoaot_dotnet_path=$payload_directory/monoaot
mv $monoaot_path $monoaot_dotnet_path
Expand Down

0 comments on commit 0eb7121

Please # to comment.