Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create superpmi-asmdiffs pipeline #61194

Merged
merged 21 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9902089
Create superpmi-asmdiffs pipeline
BruceForstall Nov 4, 2021
4af9979
Set -error_limit
BruceForstall Nov 4, 2021
3302e83
Move baseline download to setup script
BruceForstall Nov 4, 2021
f817fcb
Use `origin/main` for baseline, not `main`
BruceForstall Nov 4, 2021
ea3c180
Fix directory creation
BruceForstall Nov 4, 2021
5bd071d
Make `--no_progress` a global superpmi.py switch
BruceForstall Nov 5, 2021
b777e67
Add support for running jit-analyze on the diffs
BruceForstall Nov 5, 2021
7e84750
Add summarizing of asm diffs
BruceForstall Nov 5, 2021
a1f5ffa
Re-enable diffing all MCH files
BruceForstall Nov 5, 2021
4f5cc71
Rename azdo_pipelines_util.py -> jitutil.py
BruceForstall Nov 5, 2021
6857fbe
Move many functions from superpmi.py to jitutil.py
BruceForstall Nov 6, 2021
883e9a4
Run summarize before uploading log files
BruceForstall Nov 6, 2021
c806ca6
Fix summarize to walk the tree
BruceForstall Nov 6, 2021
b280c90
Remove change to force asm diffs
BruceForstall Nov 6, 2021
18db9a3
Merge branch 'main' of https://github.com/dotnet/runtime into runtime…
BruceForstall Nov 9, 2021
83df83c
Make sure `git fetch` and jitrollingbuild.py are run from the source …
BruceForstall Nov 9, 2021
3cc6431
Feedback
BruceForstall Nov 9, 2021
5082a6a
Only be verbose on copies
BruceForstall Nov 9, 2021
8a7e822
Assume Windows; don't use osGroup or `-platform` option to summarize …
BruceForstall Nov 10, 2021
f66c864
Reduce work item timeout to 1:00
BruceForstall Nov 10, 2021
646e417
Move asmdiffs .md files to separate log location
BruceForstall Nov 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions eng/pipelines/coreclr/superpmi-asmdiffs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pr:
branches:
include:
- main
paths:
include:
- src/coreclr/jit/*

jobs:

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/build-jit-job.yml
buildConfig: checked
platforms:
- windows_x64
- windows_x86
jobParameters:
uploadAs: 'pipelineArtifacts'

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/superpmi-asmdiffs-job.yml
buildConfig: checked
platforms:
- windows_x64
- windows_x86
helixQueueGroup: ci
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
137 changes: 137 additions & 0 deletions eng/pipelines/coreclr/templates/run-superpmi-asmdiffs-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
parameters:
steps: [] # optional -- any additional steps that need to happen before pulling down the jitutils repo and sending the jitutils to helix (ie building your repo)
variables: [] # optional -- list of additional variables to send to the template
jobName: '' # required -- job name
displayName: '' # optional -- display name for the job. Will use jobName if not passed
pool: '' # required -- name of the Build pool
container: '' # required -- name of the container
buildConfig: '' # required -- build configuration
archType: '' # required -- targeting CPU architecture
osGroup: '' # required -- operating system for the job
osSubgroup: '' # optional -- operating system subgroup
continueOnError: 'false' # optional -- determines whether to continue the build if the step errors
dependsOn: '' # optional -- dependencies of the job
timeoutInMinutes: 120 # optional -- timeout for the job
enableTelemetry: false # optional -- enable for telemetry
liveLibrariesBuildConfig: '' # optional -- live-live libraries configuration to use for the run
helixQueues: '' # required -- Helix queues
dependOnEvaluatePaths: false

jobs:
- template: xplat-pipeline-job.yml
parameters:
dependsOn: ${{ parameters.dependsOn }}
buildConfig: ${{ parameters.buildConfig }}
archType: ${{ parameters.archType }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
enableTelemetry: ${{ parameters.enableTelemetry }}
enablePublishBuildArtifacts: true
continueOnError: ${{ parameters.continueOnError }}
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}

${{ if ne(parameters.displayName, '') }}:
displayName: '${{ parameters.displayName }}'
${{ if eq(parameters.displayName, '') }}:
displayName: '${{ parameters.jobName }}'

variables:

- ${{ each variable in parameters.variables }}:
- ${{ if ne(variable.name, '') }}:
- name: ${{ variable.name }}
value: ${{ variable.value }}
- ${{ if ne(variable.group, '') }}:
- group: ${{ variable.group }}

- name: PythonScript
value: 'py -3'
- name: PipScript
value: 'py -3 -m pip'
- name: SpmiCollectionLocation
value: '$(Build.SourcesDirectory)\artifacts\spmi\'
- name: SpmiLogsLocation
value: '$(Build.SourcesDirectory)\artifacts\spmi_logs\'
- name: SpmiAsmdiffsLocation
value: '$(Build.SourcesDirectory)\artifacts\spmi_asmdiffs\'
- name: HelixResultLocation
value: '$(Build.SourcesDirectory)\artifacts\helixresults\'

workspace:
clean: all
pool:
${{ parameters.pool }}
container: ${{ parameters.container }}
steps:
- ${{ parameters.steps }}

- script: |
mkdir $(SpmiCollectionLocation)
mkdir $(SpmiLogsLocation)
mkdir $(SpmiAsmdiffsLocation)
displayName: Create directories

- script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi_asmdiffs_setup.py -source_directory $(Build.SourcesDirectory) -product_directory $(buildProductRootFolderPath) -arch $(archType)
displayName: ${{ format('SuperPMI asmdiffs setup ({0})', parameters.archType) }}

# Run superpmi asmdiffs in helix
- template: /eng/pipelines/common/templates/runtimes/send-to-helix-step.yml
parameters:
displayName: 'Send job to Helix'
helixBuild: $(Build.BuildNumber)
helixSource: $(_HelixSource)
helixType: 'build/tests/'
helixQueues: ${{ join(',', parameters.helixQueues) }}
creator: dotnet-bot
WorkItemTimeout: 2:00 # 2 hours
WorkItemDirectory: '$(WorkItemDirectory)'
CorrelationPayloadDirectory: '$(CorrelationPayloadDirectory)'
helixProjectArguments: '$(Build.SourcesDirectory)/src/coreclr/scripts/superpmi-asmdiffs.proj'
BuildConfig: ${{ parameters.buildConfig }}
osGroup: ${{ parameters.osGroup }}
archType: ${{ parameters.archType }}
shouldContinueOnError: true # Run the future step i.e. upload superpmi logs

# Always upload the available logs for diagnostics
- task: CopyFiles@2
displayName: Copying superpmi.log of all partitions
inputs:
sourceFolder: '$(HelixResultLocation)'
contents: '**/superpmi_*.log'
targetFolder: '$(SpmiLogsLocation)'
condition: always()

- task: CopyFiles@2
displayName: Copying superpmi.md of all partitions
inputs:
sourceFolder: '$(HelixResultLocation)'
contents: '**/superpmi_*.md'
targetFolder: '$(SpmiAsmdiffsLocation)'
condition: always()

- script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi_asmdiffs_summarize.py -diff_summary_dir $(SpmiAsmdiffsLocation) -arch $(archType)
displayName: ${{ format('Summarize ({0})', parameters.archType) }}
condition: always()

- task: PublishPipelineArtifact@1
displayName: Publish SuperPMI logs
inputs:
targetPath: $(SpmiLogsLocation)
artifactName: 'SuperPMI_Logs_$(archType)_$(buildConfig)'
condition: always()

- task: PublishPipelineArtifact@1
displayName: Publish SuperPMI asmdiffs files
inputs:
targetPath: $(SpmiAsmdiffsLocation)
artifactName: 'SuperPMI_Asmdiffs_$(archType)_$(buildConfig)'
condition: always()

- task: PublishPipelineArtifact@1
displayName: Publish SuperPMI build logs
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/log
artifactName: 'SuperPMI_BuildLogs_$(archType)_$(buildConfig)'
condition: always()
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
- script: |
mkdir -p $(MergedMchFileLocation)
mkdir -p $(SpmiLogsLocation)
displayName: Create directory for merged collection
displayName: Create directories
- ${{ if eq(parameters.osGroup, 'windows') }}:
- script: |
mkdir $(MergedMchFileLocation)
Expand Down
7 changes: 4 additions & 3 deletions eng/pipelines/coreclr/templates/run-superpmi-replay-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ jobs:
- ${{ parameters.steps }}

- script: |
mkdir -p $(SpmiCollectionLocation)
displayName: Create directory for SPMI collection
mkdir $(SpmiCollectionLocation)
mkdir $(SpmiLogsLocation)
displayName: Create directories

- script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi_replay_setup.py -source_directory $(Build.SourcesDirectory) -product_directory $(buildProductRootFolderPath) -arch $(archType)
displayName: ${{ format('SuperPMI replay setup ({0} {1})', parameters.osGroup, parameters.archType) }}
displayName: ${{ format('SuperPMI replay setup ({0})', parameters.archType) }}

# Run superpmi replay in helix
- template: /eng/pipelines/common/templates/runtimes/send-to-helix-step.yml
Expand Down
39 changes: 39 additions & 0 deletions eng/pipelines/coreclr/templates/superpmi-asmdiffs-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
parameters:
buildConfig: '' # required -- build configuration
archType: '' # required -- targeting CPU architecture
osGroup: '' # required -- operating system for the job
osSubgroup: '' # optional -- operating system subgroup
pool: ''
timeoutInMinutes: 120 # build timeout
variables: {}
helixQueues: ''
dependOnEvaluatePaths: false
runJobTemplate: '/eng/pipelines/coreclr/templates/run-superpmi-asmdiffs-job.yml'

jobs:
- template: ${{ parameters.runJobTemplate }}
parameters:
jobName: ${{ format('superpmi_asmdiffs_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('SuperPMI asmdiffs {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
pool: ${{ parameters.pool }}
buildConfig: ${{ parameters.buildConfig }}
archType: ${{ parameters.archType }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
helixQueues: ${{ parameters.helixQueues }}
dependsOn:
- ${{ format('coreclr_jit_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}

variables: ${{ parameters.variables }}

steps:

# Download jit builds
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(buildProductRootFolderPath)
artifactFileName: '$(buildProductArtifactName)$(archiveExtension)'
artifactName: '$(buildProductArtifactName)'
displayName: 'JIT product build'
2 changes: 1 addition & 1 deletion src/coreclr/scripts/antigen_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from os.path import getsize
import os
from coreclr_arguments import *
from azdo_pipelines_util import run_command, TempDir
from jitutil import run_command, TempDir

parser = argparse.ArgumentParser(description="description")

Expand Down
Loading