Skip to content

Commit c92fc10

Browse files
authored
Merge branch 'master' into fix_test04
2 parents 7694c10 + ab7f700 commit c92fc10

File tree

110 files changed

+6428
-1226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+6428
-1226
lines changed

.github/workflows/auto-update-dev.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Auto-Update Dev Branch from Master
2+
3+
on:
4+
push:
5+
branches:
6+
- master # Trigger workflow on commits to 'dev' branch
7+
8+
jobs:
9+
update-main:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write # Required to push to protected branches
13+
14+
steps:
15+
- name: Checkout Main Branch
16+
uses: actions/checkout@v4
17+
with:
18+
ref: dev
19+
fetch-depth: 0
20+
ssh-key: ${{ secrets.DEPLOY_KEY }}
21+
22+
- name: Configure Git User
23+
run: |
24+
git config user.name "github-actions"
25+
git config user.email "[email protected]"
26+
27+
- name: Merge auto-update into dev
28+
run: |
29+
git fetch origin master:master
30+
git merge --no-ff master -m "Auto-merge updates from master branch"
31+
32+
- name: Push Changes to Main
33+
run: |
34+
git push origin dev

.github/workflows/build_wheels.yml

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
branches:
88
- master
99
- loadgen-release
10-
- dev
1110
paths:
1211
- loadgen/**
1312

.github/workflows/format.yml

+19-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: "Code formatting"
33
on:
44
push:
55
branches:
6-
- "**"
6+
- "**"
77

88
env:
99
python_version: "3.9"
@@ -12,24 +12,33 @@ jobs:
1212
format-code:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- name: Retrieve secrets from Keeper
16+
id: ksecrets
17+
uses: Keeper-Security/ksm-action@master
18+
with:
19+
keeper-secret-config: ${{ secrets.KSM_CONFIG }}
20+
secrets: |-
21+
v2h4jKiZlJywDSoKzRMnRw/field/Access Token > env:PAT # Fetch PAT and store in environment variable
22+
23+
- name: Checkout code
24+
uses: actions/checkout@v4
1625
with:
1726
fetch-depth: 0
18-
ssh-key: ${{ secrets.DEPLOY_KEY }}
27+
1928
- name: Set up Python ${{ env.python_version }}
2029
uses: actions/setup-python@v3
2130
with:
2231
python-version: ${{ env.python_version }}
2332

24-
- name: Format modified python files
33+
- name: Format modified Python files
2534
env:
2635
filter: ${{ github.event.before }}
2736
run: |
2837
python3 -m pip install autopep8
2938
for FILE in $(git diff --name-only $filter | grep -E '.*\.py$')
3039
do
3140
# Check if the file still exists in the working tree
32-
if [ -f "$FILE" ]; then
41+
if [ -f "$FILE" ] && [ "$FILE" != "tools/submission/power/power_checker.py" ]; then
3342
autopep8 --in-place -a "$FILE"
3443
git add "$FILE"
3544
fi
@@ -49,12 +58,15 @@ jobs:
4958
done
5059
5160
- name: Commit and push changes
61+
env:
62+
PAT: ${{ env.PAT }} # Use PAT fetched from Keeper
5263
run: |
5364
HAS_CHANGES=$(git diff --staged --name-only)
5465
if [ ${#HAS_CHANGES} -gt 0 ]; then
5566
git config --global user.name mlcommons-bot
5667
git config --global user.email "[email protected]"
5768
# Commit changes
5869
git commit -m '[Automated Commit] Format Codebase'
59-
git push
60-
fi
70+
# Use the PAT to push changes
71+
git push https://x-access-token:${PAT}@github.com/${{ github.repository }} HEAD:${{ github.ref_name }}
72+
fi

.github/workflows/reset-branch.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Reset Current Branch to Upstream After Squash Merge
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: 'Branch to reset (leave blank for current branch)'
8+
required: false
9+
default: 'dev'
10+
11+
jobs:
12+
reset-branch:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Detect Current Branch
22+
if: ${{ inputs.branch == '' }}
23+
run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
24+
25+
- name: Use Input Branch
26+
if: ${{ inputs.branch != '' }}
27+
run: echo "branch=${{ inputs.branch }}" >> $GITHUB_ENV
28+
29+
- name: Add Upstream Remote
30+
run: |
31+
git remote add upstream https://github.com/mlcommons/inference.git
32+
git fetch upstream
33+
- name: Reset Branch to Upstream
34+
run: |
35+
git checkout ${{ env.branch }}
36+
git reset --hard upstream/${{ env.branch }}
37+
if: success()
38+
39+
- name: Force Push to Origin
40+
run: |
41+
git push origin ${{ env.branch }} --force-with-lease
42+
if: success()

.github/workflows/test-bert.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
python3 -m pip install cm4mlops
3737
- name: Test BERT and end to end submission generation
3838
run: |
39-
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
39+
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

.github/workflows/test-loadgen.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
24+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2525

2626
steps:
2727
- uses: actions/checkout@v3

.github/workflows/test-resnet50.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838
python3 -m pip install cm4mlops
3939
- name: Test Resnet50 and end to end submission generation
4040
run: |
41-
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 }}
41+
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 }}

.github/workflows/test-retinanet.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
python3 -m pip install cm4mlops
3737
- name: Test Retinanet and end to end submission generation
3838
run: |
39-
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
39+
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

.github/workflows/test-rgat.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Test for MLPerf inference rgat submission generation using CM script automation
2+
3+
on:
4+
pull_request:
5+
branches: [ "master", "dev" ]
6+
paths:
7+
- graph/R-GAT/**
8+
- loadgen/**
9+
- tools/submission/**
10+
- .github/workflows/test-rgat.yml
11+
- '!**.md'
12+
13+
env:
14+
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
15+
16+
jobs:
17+
build:
18+
19+
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
python-version: [ "3.11" ]
24+
backend: [ "pytorch" ]
25+
loadgen-flag: [ "" ]
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v3
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
- name: Install dependencies
34+
run: |
35+
python3 -m pip install cm4mlops
36+
- name: Test R-GAT and end to end submission generation
37+
run: |
38+
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 }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This workflow will test the submission generation using MLPerf Automation
2+
3+
name: CM based Submission Generation
4+
5+
on:
6+
pull_request:
7+
branches: [ "master", "dev" ]
8+
paths:
9+
- '.github/workflows/test-submission-generation.yml'
10+
- '**'
11+
- '!**.md'
12+
jobs:
13+
submission_generation:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, windows-latest, macos-latest]
19+
python-version: [ "3.12" ]
20+
division: ["closed", "open", "closed-open"]
21+
category: ["datacenter", "edge"]
22+
case: ["closed"]
23+
action: ["run", "docker"]
24+
exclude:
25+
- os: macos-latest
26+
- os: windows-latest
27+
- category: "edge"
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v3
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
- name: Install dependencies
36+
run: |
37+
pip install cm4mlops
38+
- name: Pull repo where test cases are uploaded
39+
run: |
40+
git clone -b submission-generation-examples https://github.com/mlcommons/inference.git submission_generation_examples
41+
- name: Run Submission Generation - ${{ matrix.case }} ${{ matrix.action }} ${{ matrix.category }} ${{ matrix.division }}
42+
continue-on-error: true
43+
run: |
44+
if [ "${{ matrix.case }}" == "closed" ]; then
45+
description="Test submission - contains closed edge and datacenter"
46+
elif [ "${{ matrix.case }}" == "closed-power" ]; then
47+
description="Test submission - contains closed-power edge and datacenter results"
48+
fi
49+
# Dynamically set the log group to simulate a dynamic step name
50+
echo "::group::$description"
51+
cm ${{ matrix.action }} script --tags=generate,inference,submission --adr.compiler.tags=gcc --version=v5.0 --clean --preprocess_submission=yes --submission_base_dir=mysubmissions --results_dir=$PWD/submission_generation_tests/${{ matrix.case }}/ --run-checker --submitter=MLCommons --tar=yes --division=${{ matrix.division }} --env.CM_DETERMINE_MEMORY_CONFIGURATION=yes --quiet
52+
cm ${{ matrix.action }} script --tags=run,submission,checker --submitter_id_off=mysubmitter_id --tar=yes --submission_dir=mysubmissions/submissions --submission_tar_file=mysubmission.tar.gz

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ loadgen/build/
22
libmlperf_loadgen.a
33
__pycache__/
44
generated/
5+
*.swp

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Please see the [MLPerf Inference benchmark paper](https://arxiv.org/abs/1911.025
1313
primaryClass={cs.LG}
1414
}
1515
```
16+
1617
Please see [here](https://docs.mlcommons.org/inference/benchmarks/) for the MLPerf inference documentation website which includes automated commands to run MLPerf inference benchmarks using different implementations.
1718

1819
## MLPerf Inference v4.1 (submission deadline July 26, 2024)
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Reference implementation fo automotive 3D detection benchmark
2+
3+
## TODO: Instructions for dataset download after it is uploaded somewhere appropriate
4+
5+
## TODO: Instructions for checkpoints downloads after it is uploaded somewhere appropriate
6+
7+
## Running with docker
8+
```
9+
docker build -t auto_inference -f dockerfile.gpu .
10+
11+
docker run --gpus=all -it -v <directory to inference repo>/inference/:/inference -v <directory to waymo dataset>/waymo:/waymo --rm auto_inference
12+
13+
cd /inference/automotive/3d-object-detection
14+
python main.py --dataset waymo --dataset-path /waymo/kitti_format/ --lidar-path <checkpoint_path>/pp_ep36.pth --segmentor-path <checkpoint_path>/best_deeplabv3plus_resnet50_waymo_os16.pth --mlperf_conf /inference/mlperf.conf

0 commit comments

Comments
 (0)