forked from mlcommons/inference
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mlcommons:master' into master
- Loading branch information
Showing
59 changed files
with
2,254 additions
and
1,654 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ loadgen/build/ | |
libmlperf_loadgen.a | ||
__pycache__/ | ||
generated/ | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.