Skip to content

Commit

Permalink
Merge pull request #118 from mlcommons/dev
Browse files Browse the repository at this point in the history
Sync Dev
  • Loading branch information
arjunsuresh authored Jan 8, 2025
2 parents 5bcde4c + 166e8e5 commit a7fc2c6
Show file tree
Hide file tree
Showing 41 changed files with 989 additions and 421 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-individual-script-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
for file in ${{ steps.getfile.outputs.files }}; do
echo $file
done
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
DOCKER_CM_REPO=${{ github.event.pull_request.head.repo.html_url }} DOCKER_CM_REPO_BRANCH=${{ github.event.pull_request.head.ref }} TEST_INPUT_INDEX=${{ matrix.test-input-index }} python3 script/test-cm-core/src/script/process_tests.py ${{ steps.getfile.outputs.files }}
11 changes: 9 additions & 2 deletions .github/workflows/test-cm-based-submission-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install cm4mlops on Windows
if: matrix.os == 'windows-latest'
run: |
$env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops
- name: Install dependencies on Unix Platforms
if: matrix.os != 'windows-latest'
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
- name: Pull repo where test cases are uploaded
run: |
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test-cm-script-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ jobs:
if: matrix.os == 'windows-latest'
run: |
git config --system core.longpaths true
- name: Install dependencies
- name: Install cm4mlops on Windows
if: matrix.os == 'windows-latest'
run: |
$env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops
- name: Install dependencies on Unix Platforms
if: matrix.os != 'windows-latest'
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Run test_docker on linux
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test-cm-tutorial-retinanet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies on Unix Platforms
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test CM Tutorial Retinanet
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test-cm-tutorial-tvm-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies on Unix Platforms
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test CM Tutorial TVM pip install with VirtualMachine Runtime
Expand All @@ -49,9 +51,11 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies on Unix Platforms
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test CM Tutorial TVM pip install with GraphExecutor Runtime
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test-cm-tutorial-tvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies on Unix Platforms
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test CM Tutorial TVM
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test-image-classification-onnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ jobs:
if: matrix.os == 'windows-latest'
run: |
git config --system core.longpaths true
- name: Install dependencies
- name: Install cm4mlops on Windows
if: matrix.os == 'windows-latest'
run: |
$env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops
- name: Install dependencies on Unix Platforms
if: matrix.os != 'windows-latest'
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test image classification with ONNX
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test-mlperf-inference-abtf-poc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,16 @@ jobs:
if: matrix.os == 'windows-latest'
run: |
git config --system core.longpaths true
- name: Install dependencies
- name: Install cm4mlops on Windows
if: matrix.os == 'windows-latest'
run: |
$env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops
- name: Install dependencies on Unix Platforms
if: matrix.os != 'windows-latest'
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
#cm pull repo mlcommons@cm4abtf --branch=poc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install cm4mlops on Windows
if: matrix.os == 'windows-latest'
run: |
$env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops
- name: Install dependencies on Unix Platforms
if: matrix.os != 'windows-latest'
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
- name: Test MLPerf Inference Bert ${{ matrix.backend }} on ${{ matrix.os }}
if: matrix.os == 'windows-latest'
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/test-mlperf-inference-mlcommons-cpp-resnet50.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,23 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install cm4mlops on Windows
if: matrix.os == 'windows-latest'
run: |
$env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops
- name: Install dependencies on Unix Platforms
if: matrix.os != 'windows-latest'
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
cm run script --quiet --tags=install,prebuilt,llvm --version=${{ matrix.llvm-version }}
- name: Test MLPerf Inference MLCommons C++ ResNet50 on ${{ matrix.os }}
if: matrix.os == 'windows-latest'
run: |
cmr "app mlperf inference mlcommons cpp" --submitter="MLCommons" --hw_name=gh_${{ matrix.os }} --adr.loadgen.tags=_from-pip --pip_loadgen=yes -v --quiet
cm run script --tags=app,mlperf,inference,mlcommons,cpp --submitter="MLCommons" --hw_name=gh_${{ matrix.os }} --adr.loadgen.tags=_from-pip --pip_loadgen=yes -v --quiet
- name: Test MLPerf Inference MLCommons C++ ResNet50 on ${{ matrix.os }}
if: matrix.os != 'windows-latest'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-mlperf-inference-resnet50.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
ubwkjh-Ii8UJDpG2EoU6GQ/field/Access Token > env:PAT # Fetch PAT and store in environment variable
- name: Push Results
if: github.repository_owner == 'mlcommons'
if: github.repository_owner == 'mlcommons_off'
env:
GITHUB_TOKEN: ${{ env.PAT }}
run: |
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test-mlperf-inference-rgat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install cm4mlops on Windows
if: matrix.os == 'windows-latest'
run: |
$env:CM_PULL_DEFAULT_MLOPS_REPO = "no"; pip install cm4mlops
- name: Install dependencies on Unix Platforms
if: matrix.os != 'windows-latest'
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
- name: Test MLPerf Inference R-GAT using ${{ matrix.backend }} on ${{ matrix.os }}
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test-mlperf-inference-rnnt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies on Unix Platforms
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: Test MLPerf Inference RNNT
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test-mlperf-inference-tvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies on Unix Platforms
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
cm run script --quiet --tags=get,sys-utils-cm
- name: MLPerf Inference ResNet50 using TVM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies on Unix Platforms
run: |
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
- name: Pull MLOps repository
run: |
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
- name: Test MLPerf loadgen with HuggingFace bert onnx fp32 squad model
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-qaic-compute-sdk-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo mlcommons@ck
CM_PULL_DEFAULT_MLOPS_REPO=no pip install cm4mlops
cm run script --tags=get,sys-utils-cm --quiet
- name: Test QAIC Compute SDK for compilation
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test-qaic-software-kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Pull MLOps repository
run: |
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo mlcommons@ck
pip install cm4mlops
cm run script --tags=get,sys-utils-cm --quiet
- name: Test Software Kit for compilation on Ubuntu 20.04
Expand Down
43 changes: 43 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributors

Thank you for your interest in contributing to **MLPerf Automations**! We welcome contributions that help improve the project and expand its functionality.

---

## How to Become a Contributor

We value all contributions, whether they are code, documentation, bug reports, or feature suggestions. If you contribute **more than 50 lines of code** (including tests and documentation), you will be officially recognized as a project contributor.

**Note:** Trivial contributions, such as minor typo fixes or small formatting changes, will not count toward the 50-line threshold.

To contribute:
1. **Fork** the repository.
2. **Create** a new branch for your feature or bug fix.
3. **Submit** a pull request (PR) describing your changes.
Please see [here](CONTRIBUTING.md) for further guidelines for official contribution to any MLCommons repository.

---

## Contributor Recognition

Once your contribution exceeds 50 lines of code (in total), we will:
- Add your name to this `CONTRIBUTORS.md` file.
- Highlight your contribution in the next release notes.
- Grant you access to suggest and vote on new features.

---

## Current Contributors

- **Grigori Fursin** - *Initial Development, CLI workflow support via CMind, Added core automation features*
- **Arjun Suresh** - *Initial Development, Added core automation features*
- **Anandhu Sooraj** - *Added multiple CM scripts for MLPerf Inference*
- **Thomaz Zhu** - *Added CPP implementation for MLPerf Inference Onnxruntime*
- **Sahil Avaran** - *Adding logging support in MLPerf script automation*
- **[Your Name Here]** - This could be you! πŸŽ‰

---

We believe in collaborative growth, and every contribution makes a difference. Feel free to reach out by opening an issue if you have any questions or ideas.

Happy Coding! πŸš€
62 changes: 57 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,65 @@
# MLPerf Automations and Scripts

This repository contains the automations and scripts used to run MLPerf benchmarks, primarily focusing on MLPerf inference benchmarks. The automations used here are largely based on and extended from the [Collective Mind script automations](https://github.com/mlcommons/cm4mlops/tree/main/automation/script).
[![License](https://img.shields.io/badge/License-Apache%202.0-green)](LICENSE.md)
[![Downloads](https://static.pepy.tech/badge/cm4mlops)](https://pepy.tech/project/cm4mlops)
[![CM Script Automation Test](https://github.com/mlcommons/mlperf-automations/actions/workflows/test-cm-script-features.yml/badge.svg)](https://github.com/mlcommons/mlperf-automations/actions/workflows/test-cm-script-features.yml)
[![MLPerf Inference ABTF POC Test](https://github.com/mlcommons/mlperf-automations/actions/workflows/test-mlperf-inference-abtf-poc.yml/badge.svg)](https://github.com/mlcommons/mlperf-automations/actions/workflows/test-mlperf-inference-abtf-poc.yml)

Welcome to the **MLPerf Automations and Scripts** repository! This repository provides tools, automations, and scripts to facilitate running MLPerf benchmarks, with a primary focus on **MLPerf Inference benchmarks**.

## Collective Mind (CM) Automations
The automations build upon and extend the powerful [Collective Mind (CM) script automations](https://github.com/mlcommons/cm4mlops/tree/main/automation/script) to streamline benchmarking and workflow processes.

**CM (Collective Mind)** is a Python package with a CLI and API designed to create and manage automations. Two key automations developed using CM are **Script** and **Cache**, which streamline ML workflows, including managing Docker runs.
---

## πŸš€ Key Features
- **Automated Benchmarking** – Simplifies running MLPerf Inference benchmarks with minimal manual intervention.
- **Modular and Extensible** – Easily extend the scripts to support additional benchmarks and configurations.
- **Seamless Integration** – Compatible with Docker, cloud environments, and local machines.
- **Collective Mind (CM) Integration** – Utilizes the CM framework to enhance reproducibility and automation.

## License
---

[Apache 2.0](LICENSE.md)
## 🧰 Collective Mind (CM) Automations

The **Collective Mind (CM)** framework is a Python-based package offering both CLI and API support for creating and managing automations. CM automations enhance ML workflows by simplifying complex tasks such as Docker container management and caching.

### Core Automations
- **Script Automation** – Automates script execution across different environments.
- **Cache Management** – Manages reusable cached results to accelerate workflow processes.

Learn more about CM in the [CM4MLOps documentation](https://github.com/mlcommons/cm4mlops).

---

## 🀝 Contributing
We welcome contributions from the community! To contribute:
1. Submit pull requests (PRs) to the **`dev`** branch.
2. Review our [CONTRIBUTORS.md](here) for guidelines and best practices.
3. Explore more about MLPerf Inference automation in the official [MLPerf Inference Documentation](https://docs.mlcommons.org/inference/).

Your contributions help drive the project forward!

---

## πŸ“° News
Stay tuned for upcoming updates and announcements.

---

## πŸ“„ License
This project is licensed under the [Apache 2.0 License](LICENSE.md).

---

## πŸ’‘ Acknowledgments and Funding
This project is made possible through the generous support of:
- [OctoML](https://octoml.ai)
- [cKnowledge.org](https://cKnowledge.org)
- [cTuning Foundation](https://cTuning.org)
- [MLCommons](https://mlcommons.org)

We appreciate their contributions and sponsorship!

---

Thank you for your interest and support in MLPerf Automations and Scripts!
Loading

0 comments on commit a7fc2c6

Please sign in to comment.