From 5f526689d0289c9445f1bea409e30ebfc85aa7e7 Mon Sep 17 00:00:00 2001 From: "microsoft-github-operations[bot]" <55726097+microsoft-github-operations[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 06:52:58 +0000 Subject: [PATCH 01/17] Initial commit --- .gitignore | 398 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 398 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8a30d25 --- /dev/null +++ b/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml From 6115800a2059a40ce7f2e007c321bb1aa070f79b Mon Sep 17 00:00:00 2001 From: Microsoft Open Source Date: Thu, 18 Apr 2024 23:53:01 -0700 Subject: [PATCH 02/17] CODE_OF_CONDUCT.md committed --- CODE_OF_CONDUCT.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..f9ba8cf --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,9 @@ +# Microsoft Open Source Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). + +Resources: + +- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) +- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns From f3aba048eb13abf5753b87302301b1af41284c11 Mon Sep 17 00:00:00 2001 From: Microsoft Open Source Date: Thu, 18 Apr 2024 23:53:02 -0700 Subject: [PATCH 03/17] README.md committed --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5cd7cec --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# Project + +> This repo has been populated by an initial template to help get you started. Please +> make sure to update the content to build a great experience for community-building. + +As the maintainer of this project, please make a few updates: + +- Improving this README.MD file to provide a great experience +- Updating SUPPORT.MD with content about this project's support experience +- Understanding the security reporting process in SECURITY.MD +- Remove this section from the README + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. + +When you submit a pull request, a CLA bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +## Trademarks + +This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft +trademarks or logos is subject to and must follow +[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). +Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. +Any use of third-party trademarks or logos are subject to those third-party's policies. From 1d4e92d67e9bb7e040d89e41e97e9bdc1826c225 Mon Sep 17 00:00:00 2001 From: Microsoft Open Source Date: Thu, 18 Apr 2024 23:53:02 -0700 Subject: [PATCH 04/17] SECURITY.md committed --- SECURITY.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..b3c89ef --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,41 @@ + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd). + + From 5d4f82e8b1afb7fc24d92445796b75107f956786 Mon Sep 17 00:00:00 2001 From: Microsoft Open Source Date: Thu, 18 Apr 2024 23:53:03 -0700 Subject: [PATCH 05/17] SUPPORT.md committed --- SUPPORT.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 SUPPORT.md diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..291d4d4 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,25 @@ +# TODO: The maintainer of this repo has not yet edited this file + +**REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? + +- **No CSS support:** Fill out this template with information about how to file issues and get help. +- **Yes CSS support:** Fill out an intake form at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). CSS will work with/help you to determine next steps. +- **Not sure?** Fill out an intake as though the answer were "Yes". CSS will help you decide. + +*Then remove this first heading from this SUPPORT.MD file before publishing your repo.* + +# Support + +## How to file issues and get help + +This project uses GitHub Issues to track bugs and feature requests. Please search the existing +issues before filing new issues to avoid duplicates. For new issues, file your bug or +feature request as a new Issue. + +For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE +FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER +CHANNEL. WHERE WILL YOU HELP PEOPLE?**. + +## Microsoft Support Policy + +Support for this **PROJECT or PRODUCT** is limited to the resources listed above. From d10cf98df7d31eb35e7b47438e05d24ae68a731b Mon Sep 17 00:00:00 2001 From: Microsoft Open Source Date: Thu, 18 Apr 2024 23:53:03 -0700 Subject: [PATCH 06/17] LICENSE committed --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9e841e7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE From d81936fd69804cc669879e6de5fae17c55d9585e Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Tue, 30 Apr 2024 06:14:51 +0000 Subject: [PATCH 07/17] Fix --- .github/workflows/tests.yaml | 15 +++++++++------ ...ale_results.py => generate_example_results.py} | 0 2 files changed, 9 insertions(+), 6 deletions(-) rename tests/{generate_exmpale_results.py => generate_example_results.py} (100%) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9559060..2a49e66 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -31,13 +31,16 @@ jobs: compare_outputs: runs-on: ubuntu-latest - name: Compare outputs + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10'] + name: Compare outputs with Python ${{ matrix.python-version }} steps: - - name: Set up Python 3.8 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} - name: Checkout current branch uses: actions/checkout@v4 - name: Install msccl and dependencies @@ -46,11 +49,11 @@ jobs: pip install -r requirements.txt - name: Copy test script/config to temp directory run: | - cp tests/generate_exmpale_results.py $RUNNER_TEMP/ + cp tests/generate_example_results.py $RUNNER_TEMP/ cp tests/configs/example-config.json $RUNNER_TEMP/ - name: generate outputs run: | - python $RUNNER_TEMP/generate_exmpale_results.py examples/mscclang/ $RUNNER_TEMP/example-config.json $RUNNER_TEMP/tests/pr-outputs/ + python $RUNNER_TEMP/generate_example_results.py examples/mscclang/ $RUNNER_TEMP/example-config.json $RUNNER_TEMP/tests/pr-outputs/ - name: Checkout main branch uses: actions/checkout@v4 with: @@ -61,7 +64,7 @@ jobs: pip install -r requirements.txt - name: generate outputs run: | - python $RUNNER_TEMP/generate_exmpale_results.py examples/mscclang/ $RUNNER_TEMP/example-config.json $RUNNER_TEMP/tests/main-outputs/ + python $RUNNER_TEMP/generate_example_results.py examples/mscclang/ $RUNNER_TEMP/example-config.json $RUNNER_TEMP/tests/main-outputs/ - name: Compare outputs run: | diff -rw $RUNNER_TEMP/tests/main-outputs/ $RUNNER_TEMP/tests/pr-outputs/ diff --git a/tests/generate_exmpale_results.py b/tests/generate_example_results.py similarity index 100% rename from tests/generate_exmpale_results.py rename to tests/generate_example_results.py From 2651faff03e3a6504ffabda2b061dd00b197450d Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Tue, 30 Apr 2024 06:17:57 +0000 Subject: [PATCH 08/17] revert --- .github/workflows/tests.yaml | 2 +- pytest.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2a49e66..3392790 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -25,7 +25,7 @@ jobs: run: | pip install --upgrade pip pip install -r requirements.txt - - name: Run tests and check at least 85% coverage + - name: Run tests and check at least 90% coverage run: | pytest diff --git a/pytest.ini b/pytest.ini index 4621e92..d68bf05 100755 --- a/pytest.ini +++ b/pytest.ini @@ -1,2 +1,2 @@ [pytest] -addopts = --cov=msccl --cov-report term-missing:skip-covered --cov-fail-under 85 -n auto +addopts = --cov=msccl --cov-report term-missing:skip-covered --cov-fail-under 90 -n auto From bb7a584c9a163976b8b5c6c13911a03158bea0f1 Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Mon, 6 May 2024 11:47:52 +0000 Subject: [PATCH 09/17] address comments --- .github/workflows/tests.yaml | 20 ++++++++++++------- .../{example-config.json => test-config.json} | 0 ...le_results.py => generate_test_results.py} | 0 3 files changed, 13 insertions(+), 7 deletions(-) rename tests/configs/{example-config.json => test-config.json} (100%) rename tests/{generate_example_results.py => generate_test_results.py} (100%) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 3392790..63ae367 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,6 +1,12 @@ name: Tests on: + workflow_dispatch: + inputs: + commit_hash: + description: 'The commit hash which would be compared to' + required: true + default: 'main' push: pull_request: branches: [ main ] @@ -21,7 +27,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install msccl and dependencies + - name: Install msccl-tools and dependencies run: | pip install --upgrade pip pip install -r requirements.txt @@ -43,28 +49,28 @@ jobs: python-version: ${{ matrix.python-version }} - name: Checkout current branch uses: actions/checkout@v4 - - name: Install msccl and dependencies + - name: Install msccl-tools and dependencies run: | pip install --upgrade pip pip install -r requirements.txt - name: Copy test script/config to temp directory run: | - cp tests/generate_example_results.py $RUNNER_TEMP/ - cp tests/configs/example-config.json $RUNNER_TEMP/ + cp tests/generate_test_results.py $RUNNER_TEMP/ + cp tests/configs/test-config.json $RUNNER_TEMP/ - name: generate outputs run: | - python $RUNNER_TEMP/generate_example_results.py examples/mscclang/ $RUNNER_TEMP/example-config.json $RUNNER_TEMP/tests/pr-outputs/ + python $RUNNER_TEMP/generate_test_results.py examples/mscclang/ $RUNNER_TEMP/test-config.json $RUNNER_TEMP/tests/pr-outputs/ - name: Checkout main branch uses: actions/checkout@v4 with: - ref: main + ref: ${{ inputs.commit_hash }} - name: Install msccl and dependencies run: | pip install --upgrade pip pip install -r requirements.txt - name: generate outputs run: | - python $RUNNER_TEMP/generate_example_results.py examples/mscclang/ $RUNNER_TEMP/example-config.json $RUNNER_TEMP/tests/main-outputs/ + python $RUNNER_TEMP/generate_test_results.py examples/mscclang/ $RUNNER_TEMP/test-config.json $RUNNER_TEMP/tests/main-outputs/ - name: Compare outputs run: | diff -rw $RUNNER_TEMP/tests/main-outputs/ $RUNNER_TEMP/tests/pr-outputs/ diff --git a/tests/configs/example-config.json b/tests/configs/test-config.json similarity index 100% rename from tests/configs/example-config.json rename to tests/configs/test-config.json diff --git a/tests/generate_example_results.py b/tests/generate_test_results.py similarity index 100% rename from tests/generate_example_results.py rename to tests/generate_test_results.py From d072a34d95bd446c4299065fe174dbd6ece490b4 Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Mon, 6 May 2024 12:02:58 +0000 Subject: [PATCH 10/17] WIP --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 63ae367..ae20c26 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -63,7 +63,7 @@ jobs: - name: Checkout main branch uses: actions/checkout@v4 with: - ref: ${{ inputs.commit_hash }} + ref: ${{ github.event.inputs.commit_hash }} - name: Install msccl and dependencies run: | pip install --upgrade pip From dda74f9d3a6e5857c322a23b24deafe77a0db794 Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Mon, 6 May 2024 12:17:22 +0000 Subject: [PATCH 11/17] Fix --- .github/workflows/tests.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ae20c26..b56be05 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: commit_hash: - description: 'The commit hash which would be compared to' + description: 'Git SHA or branch to comapre with' required: true default: 'main' push: @@ -60,10 +60,16 @@ jobs: - name: generate outputs run: | python $RUNNER_TEMP/generate_test_results.py examples/mscclang/ $RUNNER_TEMP/test-config.json $RUNNER_TEMP/tests/pr-outputs/ - - name: Checkout main branch + - name: Checkout repo (workflow_dispatch) + if: github.event_name == 'workflow_dispatch' uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.commit_hash }} + - name: Checkout main branch (pull_request) + if: github.event_name == 'pull_request' + uses: actions/checkout@v4 + with: + ref: 'main' - name: Install msccl and dependencies run: | pip install --upgrade pip From f47dfe977d1baa3084c92d5c2576ba573865d28a Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Mon, 6 May 2024 12:20:28 +0000 Subject: [PATCH 12/17] Fix --- .github/workflows/tests.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b56be05..c710d3f 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -60,13 +60,13 @@ jobs: - name: generate outputs run: | python $RUNNER_TEMP/generate_test_results.py examples/mscclang/ $RUNNER_TEMP/test-config.json $RUNNER_TEMP/tests/pr-outputs/ - - name: Checkout repo (workflow_dispatch) + - name: Checkout specific branch if: github.event_name == 'workflow_dispatch' uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.commit_hash }} - - name: Checkout main branch (pull_request) - if: github.event_name == 'pull_request' + - name: Checkout main branch + if: github.event_name == 'pull_request' || github.event_name == 'push' uses: actions/checkout@v4 with: ref: 'main' From daef76ab3f1a4f6f5a7b36b707be976ad83d9ccf Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Mon, 6 May 2024 12:23:29 +0000 Subject: [PATCH 13/17] WIP --- .github/workflows/tests.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c710d3f..cc71639 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -60,13 +60,12 @@ jobs: - name: generate outputs run: | python $RUNNER_TEMP/generate_test_results.py examples/mscclang/ $RUNNER_TEMP/test-config.json $RUNNER_TEMP/tests/pr-outputs/ - - name: Checkout specific branch - if: github.event_name == 'workflow_dispatch' - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.commit_hash }} + # - name: Checkout specific branch + # if: github.event_name == 'workflow_dispatch' + # uses: actions/checkout@v4 + # with: + # ref: ${{ github.event.inputs.commit_hash }} - name: Checkout main branch - if: github.event_name == 'pull_request' || github.event_name == 'push' uses: actions/checkout@v4 with: ref: 'main' From 3d2d8385eff7bd568d49582ecbbcb83476879cd9 Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Mon, 6 May 2024 12:24:53 +0000 Subject: [PATCH 14/17] WIP --- .github/workflows/tests.yaml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index cc71639..499b159 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: commit_hash: - description: 'Git SHA or branch to comapre with' + description: 'The commit hash which would be compared to' required: true default: 'main' push: @@ -60,15 +60,10 @@ jobs: - name: generate outputs run: | python $RUNNER_TEMP/generate_test_results.py examples/mscclang/ $RUNNER_TEMP/test-config.json $RUNNER_TEMP/tests/pr-outputs/ - # - name: Checkout specific branch - # if: github.event_name == 'workflow_dispatch' - # uses: actions/checkout@v4 - # with: - # ref: ${{ github.event.inputs.commit_hash }} - name: Checkout main branch - uses: actions/checkout@v4 - with: - ref: 'main' + uses: actions/checkout@v4 + with: + ref: main - name: Install msccl and dependencies run: | pip install --upgrade pip From 5a34cd5c8b4ae62b84368ea399bf6554b1880fbc Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Mon, 6 May 2024 12:25:55 +0000 Subject: [PATCH 15/17] WIP --- .github/workflows/tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 499b159..e5311a5 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -62,6 +62,7 @@ jobs: python $RUNNER_TEMP/generate_test_results.py examples/mscclang/ $RUNNER_TEMP/test-config.json $RUNNER_TEMP/tests/pr-outputs/ - name: Checkout main branch uses: actions/checkout@v4 + if: github.event_name == 'pull_request' || github.event_name == 'push' with: ref: main - name: Install msccl and dependencies From 02b5de94876416b55240c41599fcce34edbbb74f Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Mon, 6 May 2024 12:27:18 +0000 Subject: [PATCH 16/17] WIP --- .github/workflows/tests.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e5311a5..97cf8a6 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -60,6 +60,11 @@ jobs: - name: generate outputs run: | python $RUNNER_TEMP/generate_test_results.py examples/mscclang/ $RUNNER_TEMP/test-config.json $RUNNER_TEMP/tests/pr-outputs/ + - name: Checkout specific branch + if: github.event_name == 'workflow_dispatch' + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.commit_hash }} - name: Checkout main branch uses: actions/checkout@v4 if: github.event_name == 'pull_request' || github.event_name == 'push' From 06d77762ba1dfc046b249f3d02c4dcbc6f0120ed Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Mon, 6 May 2024 12:33:50 +0000 Subject: [PATCH 17/17] done --- .github/workflows/tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 97cf8a6..133e11a 100755 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -4,9 +4,9 @@ on: workflow_dispatch: inputs: commit_hash: - description: 'The commit hash which would be compared to' + description: 'The git commit hash to compare against' required: true - default: 'main' + default: 'fa5accc63ac39840422ff0d6b0ee875706c95e90' # legacy main branch commit hash push: pull_request: branches: [ main ]