Skip to content

Commit

Permalink
Merge branch 'mlcommons:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh authored Dec 20, 2024
2 parents 1c6bc49 + be6ff52 commit 3b597ba
Show file tree
Hide file tree
Showing 59 changed files with 2,254 additions and 1,654 deletions.
26 changes: 0 additions & 26 deletions .github/scripts/format-cpp.sh

This file was deleted.

26 changes: 0 additions & 26 deletions .github/scripts/format-py.sh

This file was deleted.

19 changes: 15 additions & 4 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,20 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3

- name: Install requirements
run: python -m pip install cibuildwheel twine
run: python -m pip install cibuildwheel twine build

- name: Build src dist
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
python -m build --sdist --outdir wheels loadgen
- name: Build wheels
run: git pull && python -m cibuildwheel loadgen/ --output-dir wheels
Expand Down Expand Up @@ -110,12 +115,18 @@ jobs:
with:
name: wheels-ubuntu-latest
path: wheels
# Download the built wheels from macOS
- name: Download macOS wheels
# Download the built wheels from macOS-latest
- name: Download macOS-latest wheels
uses: actions/download-artifact@v4
with:
name: wheels-macos-latest
path: wheels
# Download the built wheels from macOS-13 (x86)
- name: Download macOS-13 (x86) wheels
uses: actions/download-artifact@v4
with:
name: wheels-macos-13
path: wheels
# Download the built wheels from Windows
- name: Download Windows wheels
uses: actions/download-artifact@v4
Expand Down
58 changes: 34 additions & 24 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,60 @@
# Automatic code formatting
name: "format"
name: "Code formatting"
on:
pull_request:
branches: [ master ]
types: [opened, closed, synchronize]

push:
branches:
- "**"

env:
python_version: "3.9"
HEAD_REF: ${{ github.head_ref }}

jobs:
format-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Set up Python ${{ env.python_version }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.python_version }}

- name: Install dependencies
- name: Format modified python files
env:
filter: ${{ github.event.before }}
run: |
python3 -m pip install autopep8
for FILE in $(git diff --name-only $filter | grep -E '.*\.py$')
do
# Check if the file still exists in the working tree
if [ -f "$FILE" ]; then
autopep8 --in-place -a "$FILE"
git add "$FILE"
fi
done
- name: Grant permissions
run: |
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/format-cpp.sh"
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/format-py.sh"
- name: Format Codebase
- name: Format modified C++ files
env:
filter: ${{ github.event.before }}
run: |
git remote add upstream ${{ github.event.pull_request.base.repo.clone_url }}
git fetch upstream ${{ github.event.pull_request.base.ref }}
".github/scripts/format-cpp.sh" "upstream" "${{ github.event.pull_request.base.ref }}"
".github/scripts/format-py.sh" "upstream" "${{ github.event.pull_request.base.ref }}"
for FILE in $(git diff --name-only $filter | grep -E '.*\.(cc|cpp|h|hpp)$')
do
# Check if the file still exists in the working tree
if [ -f "$FILE" ]; then
clang-format -i -style=file $FILE
git add $FILE
fi
done
- name: Commit
- name: Commit and push changes
run: |
HAS_CHANGES=$(git diff --staged --name-only)
if [ ${#HAS_CHANGES} -gt 0 ]; then
git checkout -B "$HEAD_REF"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
git config --global user.name mlcommons-bot
git config --global user.email "mlcommons-bot@users.noreply.github.com"
# Commit changes
git commit -m '[Automated Commit] Format Codebase'
git push origin "$HEAD_REF"
fi
git push
fi
2 changes: 1 addition & 1 deletion .github/workflows/test-bert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
python3 -m pip install cm4mlops
- name: Test BERT and end to end submission generation
run: |
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=bert-99 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.$PR_HEAD_REF --adr.loadgen.version=custom
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=bert-99 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.$PR_HEAD_REF --adr.inference-src-loadgen.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src-loadgen.version=custom --adr.loadgen.version=custom
2 changes: 1 addition & 1 deletion .github/workflows/test-resnet50.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
python3 -m pip install cm4mlops
- name: Test Resnet50 and end to end submission generation
run: |
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=resnet50 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --adr.loadgen.version=custom ${{ matrix.loadgen-flag }}
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=resnet50 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --adr.inference-src-loadgen.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src-loadgen.version=custom --adr.loadgen.version=custom ${{ matrix.loadgen-flag }}
2 changes: 1 addition & 1 deletion .github/workflows/test-retinanet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
python3 -m pip install cm4mlops
- name: Test Retinanet and end to end submission generation
run: |
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=retinanet --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=10 --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.$PR_HEAD_REF --adr.loadgen.version=custom
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=retinanet --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=10 --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.$PR_HEAD_REF --adr.inference-src-loadgen.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src-loadgen.version=custom --adr.loadgen.version=custom
38 changes: 38 additions & 0 deletions .github/workflows/test-rgat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test for MLPerf inference rgat submission generation using CM script automation

on:
pull_request:
branches: [ "master", "dev" ]
paths:
- graph/R-GAT/**
- loadgen/**
- tools/submission/**
- .github/workflows/test-rgat.yml
- '!**.md'

env:
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.11" ]
backend: [ "pytorch" ]
loadgen-flag: [ "" ]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install cm4mlops
- name: Test R-GAT and end to end submission generation
run: |
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --category=datacenter --hw_name=default --model=rgat --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src-loadgen.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src-loadgen.version=custom --adr.loadgen.version=custom ${{ matrix.loadgen-flag }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ loadgen/build/
libmlperf_loadgen.a
__pycache__/
generated/
*.swp
2 changes: 2 additions & 0 deletions compliance/nvidia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ The `run_verification.py` found in each test directory will copy the test files
| gpt-j | - |
| stable-diffusion-xl | [TEST01](./TEST01/), [TEST04](./TEST04/) |
| Llama2-70b | [TEST06](./TEST06/) |
| Llama3.1-405b | [TEST06](./TEST06/) |
| mixtral-8x7b | [TEST06](./TEST06/) |
| R-GAT | [TEST01](./TEST01/) |
39 changes: 39 additions & 0 deletions docs/benchmarks/graph/get-rgat-data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
hide:
- toc
---

# Graph Neural Network using R-GAT

## Dataset

The benchmark implementation run command will automatically download the validation and calibration datasets and do the necessary preprocessing. In case you want to download only the datasets, you can use the below commands.

=== "Full Dataset"
R-GAT validation run uses the IGBH dataset consisting of 547,306,935 nodes and 5,812,005,639 edges.

### Get Full Dataset
```
cm run script --tags=get,dataset,igbh,_full -j
```

=== "Debug Dataset"
R-GAT debug run uses the IGBH debug dataset(tiny).

### Get Full Dataset
```
cm run script --tags=get,dataset,igbh,_debug -j
```

## Model
The benchmark implementation run command will automatically download the required model and do the necessary conversions. In case you want to only download the official model, you can use the below commands.

Get the Official MLPerf R-GAT Model

=== "PyTorch"

### PyTorch
```
cm run script --tags=get,ml-model,rgat -j
```

13 changes: 13 additions & 0 deletions docs/benchmarks/graph/rgat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
hide:
- toc
---


# Graph Neural Network using R-GAT


=== "MLCommons-Python"
## MLPerf Reference Implementation in Python

{{ mlperf_inference_implementation_readme (4, "rgat", "reference", devices = ["CPU", "CUDA"]) }}
19 changes: 15 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MLPerf Inference Benchmarks

## Overview
The currently valid [MLPerf Inference Benchmarks](index_gh.md) as of MLPerf inference v4.0 round are listed below, categorized by tasks. Under each model you can find its details like the dataset used, reference accuracy, server latency constraints etc.
The currently valid [MLPerf Inference Benchmarks](index_gh.md) as of MLPerf inference v5.0 round are listed below, categorized by tasks. Under each model you can find its details like the dataset used, reference accuracy, server latency constraints etc.

---

Expand Down Expand Up @@ -80,7 +80,7 @@ The currently valid [MLPerf Inference Benchmarks](index_gh.md) as of MLPerf infe
- **Server Scenario Latency Constraint**: 130ms
- **Equal Issue mode**: False
- **High accuracy variant**: yes
- **Submission Category**: Datacenter, Edge
- **Submission Category**: Edge

#### [LLAMA2-70B](benchmarks/language/llama2-70b.md)
- **Dataset**: OpenORCA (GPT-4 split, max_seq_len=1024)
Expand Down Expand Up @@ -157,11 +157,22 @@ The currently valid [MLPerf Inference Benchmarks](index_gh.md) as of MLPerf infe
- **High accuracy variant**: Yes
- **Submission Category**: Datacenter

## Graph Neural Networks
### [R-GAT](benchmarks/graph/rgat.md)
- **Dataset**: Illinois Graph Benchmark Heterogeneous validation dataset
- **Dataset Size**: 788,379
- **QSL Size**: 788,379
- **Number of Parameters**:
- **Reference Model Accuracy**: ACC = ?
- **Server Scenario Latency Constraint**: N/A
- **Equal Issue mode**: True
- **High accuracy variant**: No
- **Submission Category**: Datacenter
---

## Submission Categories
- **Datacenter Category**: All the current inference benchmarks are applicable to the datacenter category.
- **Edge Category**: All benchmarks except DLRMv2, LLAMA2-70B, and Mixtral-8x7B are applicable to the edge category.
- **Datacenter Category**: All benchmarks except bert are applicable to the datacenter category for inference v5.0.
- **Edge Category**: All benchmarks except DLRMv2, LLAMA2-70B, Mixtral-8x7B and R-GAT are applicable to the edge category for v5.0.

## High Accuracy Variants
- **Benchmarks**: `bert`, `llama2-70b`, `gpt-j`, `dlrm_v2`, and `3d-unet` have a normal accuracy variant as well as a high accuracy variant.
Expand Down
Loading

0 comments on commit 3b597ba

Please sign in to comment.