From 11e22cebdf2e76795be088d12830eed767367d51 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Wed, 10 May 2023 14:18:05 -0700 Subject: [PATCH] [PERF] Add arm64 dynamic pgo runs (#86014) * Add DynamicPGO arm64 linux and windows runs. * Added parity to performance-setup.sh for pgo (no, dynamic, full) runs. * Pass the pgoRunType through to the performance (Unix) setup script as well in performance-job.yml. * Add Linux x64 dynamic pgo. --- eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 16 ++++++++ eng/pipelines/coreclr/perf_slow.yml | 37 ++++++++++++++++++- .../coreclr/templates/run-performance-job.yml | 2 +- eng/testing/performance/performance-setup.sh | 36 ++++++++++++++++++ 4 files changed, 89 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml index 323da64d340a0..cd8f01bf1652c 100644 --- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml +++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml @@ -265,6 +265,22 @@ jobs: 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: + - linux_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 diff --git a/eng/pipelines/coreclr/perf_slow.yml b/eng/pipelines/coreclr/perf_slow.yml index 23ac03be52fd8..1561fbc013a89 100644 --- a/eng/pipelines/coreclr/perf_slow.yml +++ b/eng/pipelines/coreclr/perf_slow.yml @@ -189,6 +189,24 @@ extends: logicalmachine: 'perfampere' timeoutInMinutes: 500 + # run coreclr Linux arm64 ampere microbenchmarks perf job + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - linux_arm64 + jobParameters: + testGroup: perf + liveLibrariesBuildConfig: Release + projectFile: microbenchmarks.proj + runKind: micro + runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perfampere' + timeoutInMinutes: 500 + pgoRunType: --dynamicpgo + # run coreclr Windows arm64 microbenchmarks perf job - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -220,7 +238,24 @@ extends: runKind: micro runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml logicalmachine: 'perfampere' - + + # run coreclr Windows arm64 ampere dynamic Pgo microbenchmarks perf job + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - windows_arm64 + jobParameters: + testGroup: perf + liveLibrariesBuildConfig: Release + projectFile: microbenchmarks.proj + runKind: micro + runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perfampere' + pgoRunType: -DynamicPgo + # run coreclr cloudvm microbenchmarks perf job # this run is added temporarily for measuring AVX-512 performance - template: /eng/pipelines/common/platform-matrix.yml diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index ac678053d91cf..a3c1d5b125ae6 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -157,7 +157,7 @@ jobs: 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 }} --uselocalcommittime ${{ parameters.extraSetupParameters }} + - script: $(Build.SourcesDirectory)/eng/testing/performance/performance-setup.sh $(IsInternal)$(Interpreter) --framework $(_Framework) --kind ${{ parameters.runKind }} --logicalmachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} --uselocalcommittime ${{ parameters.extraSetupParameters }} displayName: Performance Setup (Unix) condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh index 4121aee0e8d7e..871a745c3375d 100755 --- a/eng/testing/performance/performance-setup.sh +++ b/eng/testing/performance/performance-setup.sh @@ -139,6 +139,18 @@ while (($# > 0)); do wasmaot=true shift 1 ;; + --nopgo) + nopgo=true + shift 1 + ;; + --dynamicpgo) + dynamicpgo=true + shift 1 + ;; + --fullpgo) + fullpgo=true + shift 1 + ;; --compare) compare=true shift 1 @@ -213,6 +225,9 @@ while (($# > 0)); do echo " --iosllvmbuild Set LLVM for iOS Mono/Maui runs" echo " --mauiversion Set the maui version for Mono/Maui runs" echo " --uselocalcommittime Pass local runtime commit time to the setup script" + echo " --nopgo Set for No PGO runs" + echo " --dynamicpgo Set for dynamic PGO runs" + echo " --fullpgo Set for Full PGO runs" echo "" exit 1 ;; @@ -318,6 +333,17 @@ if [[ "$iosmono" == "true" ]]; then extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments" fi +if [[ "$nopgo" == "true" ]]; then + configurations="$configurations PGOType=nopgo" +fi +if [[ "$dynamicpgo" == "true" ]]; then + configurations="$configurations PGOType=dynamicpgo" +fi +if [[ "$fullpgo" == "true" ]]; then + configurations="$configurations PGOType=fullpgo" + extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --category-exclusion-filter NoAOT" +fi + cleaned_branch_name="main" if [[ $branch == *"refs/heads/release"* ]]; then cleaned_branch_name=${branch/refs\/heads\//} @@ -380,6 +406,16 @@ if [[ -n "$dotnet_versions" ]]; then setup_arguments="$setup_arguments --dotnet-versions $dotnet_versions" fi +if [[ "$nopgo" == "true" ]]; then + setup_arguments="$setup_arguments --no-pgo" +fi +if [[ "$dynamicpgo" == "true" ]]; then + setup_arguments="$setup_arguments --dynamic-pgo" +fi +if [[ "$fullpgo" == "true" ]]; then + setup_arguments="$setup_arguments --full-pgo" +fi + if [[ "$monoaot" == "true" ]]; then monoaot_dotnet_path=$payload_directory/monoaot mv $monoaot_path $monoaot_dotnet_path