Skip to content

Commit bd5ed77

Browse files
authored
Merge pull request #99 from mlcommons/dev
Merge with dev
2 parents 298f35a + 62ed33d commit bd5ed77

File tree

65 files changed

+4928
-99
lines changed

Some content is hidden

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

65 files changed

+4928
-99
lines changed

.github/workflows/format.yml

Lines changed: 9 additions & 8 deletions
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,16 +12,17 @@ jobs:
1212
format-code:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- name: Checkout code
16+
uses: actions/checkout@v4
1617
with:
1718
fetch-depth: 0
18-
ssh-key: ${{ secrets.DEPLOY_KEY }}
19+
1920
- name: Set up Python ${{ env.python_version }}
2021
uses: actions/setup-python@v3
2122
with:
2223
python-version: ${{ env.python_version }}
2324

24-
- name: Format modified python files
25+
- name: Format modified Python files
2526
env:
2627
filter: ${{ github.event.before }}
2728
run: |
@@ -48,14 +49,14 @@ jobs:
4849
fi
4950
done
5051
51-
- name: Commit and Push
52+
- name: Commit and push changes
5253
run: |
5354
HAS_CHANGES=$(git diff --staged --name-only)
5455
if [ ${#HAS_CHANGES} -gt 0 ]; then
5556
git config --global user.name mlcommons-bot
5657
git config --global user.email "mlcommons-bot@users.noreply.github.com"
5758
# Commit changes
5859
git commit -m '[Automated Commit] Format Codebase'
59-
git push
60-
61-
fi
60+
# Use the PAT to push changes
61+
git push
62+
fi

.github/workflows/run-individual-script-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Individual CM script Tests
33

44
on:
55
pull_request:
6-
branches: [ "main", "mlperf-inference", "dev" ]
6+
branches: [ "main", "dev" ]
77
paths:
88
- 'script/**_cm.json'
9-
- 'script/**_cm.yml'
9+
- 'script/**_cm.yaml'
1010

1111
jobs:
1212
run-script-tests:
@@ -34,4 +34,4 @@ jobs:
3434
done
3535
python3 -m pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
3636
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
37-
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 tests/script/process_tests.py ${{ steps.getfile.outputs.files }}
37+
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 }}

.github/workflows/test-mlperf-inference-abtf-poc.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
22

3-
name: MLPerf inference ABTF POC Test
3+
name: MLPerf Automotive POC Test
44

55
on:
66
pull_request:
7-
branches: [ "main", "mlperf-inference" ]
7+
branches: [ "main", "dev" ]
88
paths:
99
- '.github/workflows/test-mlperf-inference-abtf-poc.yml'
1010
- '**'
@@ -55,7 +55,7 @@ jobs:
5555
run: |
5656
pip install "cmind @ git+https://git@github.com/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
5757
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
58-
cm pull repo mlcommons@cm4abtf --branch=poc
58+
#cm pull repo mlcommons@cm4abtf --branch=poc
5959
6060
- name: Install Docker on macos
6161
if: runner.os == 'macOS-deactivated'

.github/workflows/test-mlperf-inference-mixtral.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ jobs:
3131
git config --global credential.helper store
3232
huggingface-cli login --token ${{ secrets.HF_TOKEN }} --add-to-git-credential
3333
cm pull repo
34-
cm run script --tags=run-mlperf,inference,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --model=mixtral-8x7b --implementation=reference --batch_size=1 --precision=${{ matrix.precision }} --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --docker_it=no --docker_cm_repo=gateoverflow@mlperf-automations --adr.compiler.tags=gcc --hw_name=gh_action --docker_dt=yes --results_dir=$HOME/gh_action_results --submission_dir=$HOME/gh_action_submissions --docker --quiet --test_query_count=3 --target_qps=0.001 --clean --env.CM_MLPERF_MODEL_MIXTRAL_8X7B_DOWNLOAD_TO_HOST=yes --env.CM_MLPERF_DATASET_MIXTRAL_8X7B_DOWNLOAD_TO_HOST=yes --adr.openorca-mbxp-gsm8k-combined-preprocessed.tags=_size.1
34+
cm run script --tags=run-mlperf,inference,_submission,_short --adr.inference-src.tags=_branch.dev --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --model=mixtral-8x7b --implementation=reference --batch_size=1 --precision=${{ matrix.precision }} --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --docker_it=no --docker_cm_repo=gateoverflow@mlperf-automations --adr.compiler.tags=gcc --hw_name=gh_action --docker_dt=yes --results_dir=$HOME/gh_action_results --submission_dir=$HOME/gh_action_submissions --docker --quiet --test_query_count=3 --target_qps=0.001 --clean --env.CM_MLPERF_MODEL_MIXTRAL_8X7B_DOWNLOAD_TO_HOST=yes --env.CM_MLPERF_DATASET_MIXTRAL_8X7B_DOWNLOAD_TO_HOST=yes --adr.openorca-mbxp-gsm8k-combined-preprocessed.tags=_size.1
3535
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=dev --commit_message="Results from self hosted Github actions - GO-phoenix" --quiet --submission_dir=$HOME/gh_action_submissions

.github/workflows/test-mlperf-inference-resnet50.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ jobs:
6464
git config --global credential.https://github.com.helper "!gh auth git-credential"
6565
git config --global credential.https://gist.github.com.helper ""
6666
git config --global credential.https://gist.github.com.helper "!gh auth git-credential"
67-
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=dev --commit_message="Results from R50 GH action on ${{ matrix.os }}" --quiet
67+
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R50 GH action on ${{ matrix.os }}" --quiet

.github/workflows/test-mlperf-inference-retinanet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ jobs:
6464
git config --global credential.https://github.com.helper "!gh auth git-credential"
6565
git config --global credential.https://gist.github.com.helper ""
6666
git config --global credential.https://gist.github.com.helper "!gh auth git-credential"
67-
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=dev --commit_message="Results from Retinanet GH action on ${{ matrix.os }}" --quiet
67+
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from Retinanet GH action on ${{ matrix.os }}" --quiet

.github/workflows/test-mlperf-inference-rgat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
3232
- name: Test MLPerf Inference R-GAT using ${{ matrix.backend }} on ${{ matrix.os }}
3333
run: |
34-
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --pull_changes=yes --pull_inference_changes=yes --submitter="MLCommons" --hw_name=gh_${{ matrix.os }}_x86 --model=rgat --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --category=datacenter --quiet -v --target_qps=1
34+
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --adr.inference-src.tags=_branch.dev --pull_changes=yes --pull_inference_changes=yes --submitter="MLCommons" --hw_name=gh_${{ matrix.os }}_x86 --model=rgat --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --category=datacenter --quiet -v --target_qps=1
3535
- name: Push Results
3636
if: github.repository_owner == 'gateoverflow'
3737
env:
@@ -45,4 +45,4 @@ jobs:
4545
git config --global credential.https://github.com.helper "!gh auth git-credential"
4646
git config --global credential.https://gist.github.com.helper ""
4747
git config --global credential.https://gist.github.com.helper "!gh auth git-credential"
48-
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=dev --commit_message="Results from R-GAT GH action on ${{ matrix.os }}" --quiet
48+
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R-GAT GH action on ${{ matrix.os }}" --quiet

.github/workflows/test-mlperf-inference-sdxl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
python3 -m pip install cm4mlops
2323
cm pull repo
2424
cm run script --tags=run-mlperf,inference,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --docker --model=sdxl --backend=${{ matrix.backend }} --device=cuda --scenario=Offline --test_query_count=1 --precision=${{ matrix.precision }} --quiet --docker_it=no --docker_cm_repo=gateoverflow@mlperf-automations --adr.compiler.tags=gcc --hw_name=gh_action --docker_dt=yes --results_dir=$HOME/gh_action_results --submission_dir=$HOME/gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean
25-
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=dev --commit_message="Results from self hosted Github actions - NVIDIARTX4090" --quiet --submission_dir=$HOME/gh_action_submissions
25+
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from self hosted Github actions - NVIDIARTX4090" --quiet --submission_dir=$HOME/gh_action_submissions

.github/workflows/test-nvidia-mlperf-inference-implementations.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: MLPerf Inference Nvidia implementations
22

33
on:
44
schedule:
5-
- cron: "08 01 * * */3" #to be adjusted
5+
- cron: "58 23 * * *" #to be adjusted
66

77
jobs:
88
run_nvidia:
@@ -17,20 +17,31 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
system: [ "GO-spr", "phoenix-Amd-Am5", "GO-i9" ]
20+
# system: [ "GO-spr", "phoenix-Amd-Am5", "GO-i9", "mlc-server" ]
21+
system: [ "mlc-server" ]
2122
python-version: [ "3.12" ]
2223
model: [ "resnet50", "retinanet", "bert-99", "bert-99.9", "gptj-99.9", "3d-unet-99.9", "sdxl" ]
2324
exclude:
2425
- model: gptj-99.9
2526

2627
steps:
2728
- name: Test MLPerf Inference NVIDIA ${{ matrix.model }}
29+
env:
30+
gpu_name: rtx_4090
2831
run: |
2932
# Set hw_name based on matrix.system
3033
if [ "${{ matrix.system }}" = "GO-spr" ]; then
3134
hw_name="RTX4090x2"
35+
gpu_name=rtx_4090
36+
docker_string=" --docker"
37+
elif [ "${{ matrix.system }}" = "mlc-server" ]; then
38+
hw_name="H100x8"
39+
gpu_name=h100
40+
docker_string=" "
3241
else
3342
hw_name="RTX4090x1"
43+
gpu_name=rtx_4090
44+
docker_string=" --docker"
3445
fi
3546
3647
if [ -f "gh_action/bin/deactivate" ]; then source gh_action/bin/deactivate; fi
@@ -40,6 +51,6 @@ jobs:
4051
pip install --upgrade cm4mlops
4152
cm pull repo
4253
43-
cm run script --tags=run-mlperf,inference,_all-scenarios,_submission,_full,_r4.1-dev --preprocess_submission=yes --pull_changes=yes --pull_inference_changes=yes --execution_mode=valid --gpu_name=rtx_4090 --pull_changes=yes --pull_inference_changes=yes --model=${{ matrix.model }} --submitter="MLCommons" --hw_name=$hw_name --implementation=nvidia --backend=tensorrt --category=datacenter,edge --division=closed --docker_dt=yes --docker_it=no --docker_cm_repo=mlcommons@mlperf-automations --docker_cm_repo_branch=dev --adr.compiler.tags=gcc --device=cuda --use_model_from_host=yes --use_dataset_from_host=yes --results_dir=$HOME/gh_action_results --submission_dir=$HOME/gh_action_submissions --clean --docker --quiet
54+
cm run script --tags=run-mlperf,inference,_all-scenarios,_submission,_full,_r4.1-dev --preprocess_submission=yes --pull_changes=yes --pull_inference_changes=yes --execution_mode=valid --gpu_name=$gpu_name --pull_changes=yes --pull_inference_changes=yes --model=${{ matrix.model }} --submitter="MLCommons" --hw_name=$hw_name --implementation=nvidia --backend=tensorrt --category=datacenter,edge --division=closed --docker_dt=yes --docker_it=no --docker_cm_repo=mlcommons@mlperf-automations --docker_cm_repo_branch=dev --adr.compiler.tags=gcc --device=cuda --use_model_from_host=yes --use_dataset_from_host=yes --results_dir=$HOME/gh_action_results --submission_dir=$HOME/gh_action_submissions --clean $docker_string --quiet
4455
4556
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_unofficial_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from GH action on NVIDIA_$hw_name" --quiet --submission_dir=$HOME/gh_action_submissions --hw_name=$hw_name

automation/script/module_misc.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,6 +1902,9 @@ def docker(i):
19021902

19031903
noregenerate_docker_file = i.get('docker_noregenerate', False)
19041904
norecreate_docker_image = i.get('docker_norecreate', True)
1905+
recreate_docker_image = i.get('docker_recreate', False)
1906+
if recreate_docker_image: # force recreate
1907+
norecreate_docker_image = False
19051908

19061909
if i.get('docker_skip_build', False):
19071910
noregenerate_docker_file = True
@@ -1974,8 +1977,6 @@ def docker(i):
19741977
env['CM_DOCKER_CACHE'] = docker_cache
19751978

19761979
image_repo = i.get('docker_image_repo', '')
1977-
if image_repo == '':
1978-
image_repo = 'local'
19791980

19801981
# Host system needs to have docker
19811982
r = self_module.cmind.access({'action': 'run',
@@ -2169,7 +2170,7 @@ def docker(i):
21692170

21702171
# env keys corresponding to container mounts are explicitly passed to
21712172
# the container run cmd
2172-
container_env_string = ''
2173+
container_env = {}
21732174
for index in range(len(mounts)):
21742175
mount = mounts[index]
21752176
# Since windows may have 2 :, we search from the right
@@ -2211,7 +2212,6 @@ def docker(i):
22112212
new_container_mount, new_container_mount_env = get_container_path(
22122213
env[tmp_value])
22132214
container_env_key = new_container_mount_env
2214-
# container_env_string += " --env.{}={} ".format(tmp_value, new_container_mount_env)
22152215
else: # we skip those mounts
22162216
mounts[index] = None
22172217
skip = True
@@ -2223,8 +2223,7 @@ def docker(i):
22232223
continue
22242224
mounts[index] = new_host_mount + ":" + new_container_mount
22252225
if host_env_key:
2226-
container_env_string += " --env.{}={} ".format(
2227-
host_env_key, container_env_key)
2226+
container_env[host_env_key] = container_env_key
22282227

22292228
for v in docker_input_mapping:
22302229
if docker_input_mapping[v] == host_env_key:
@@ -2255,10 +2254,16 @@ def docker(i):
22552254
for key in proxy_keys:
22562255
if os.environ.get(key, '') != '':
22572256
value = os.environ[key]
2258-
container_env_string += " --env.{}={} ".format(key, value)
2257+
container_env[key] = value
22592258
env['+ CM_DOCKER_BUILD_ARGS'].append(
22602259
"{}={}".format(key, value))
22612260

2261+
if container_env:
2262+
if not i_run_cmd.get('env'):
2263+
i_run_cmd['env'] = container_env
2264+
else:
2265+
i_run_cmd['env'] = {**i_run_cmd['env'], **container_env}
2266+
22622267
docker_use_host_group_id = i.get(
22632268
'docker_use_host_group_id',
22642269
docker_settings.get('use_host_group_id'))
@@ -2400,8 +2405,7 @@ def docker(i):
24002405
'docker_run_cmd_prefix': i.get('docker_run_cmd_prefix', '')})
24012406
if r['return'] > 0:
24022407
return r
2403-
run_cmd = r['run_cmd_string'] + ' ' + \
2404-
container_env_string + ' --docker_run_deps '
2408+
run_cmd = r['run_cmd_string'] + ' ' + ' --docker_run_deps '
24052409

24062410
env['CM_RUN_STATE_DOCKER'] = True
24072411

@@ -2432,10 +2436,8 @@ def docker(i):
24322436
'docker_os_version': docker_os_version,
24332437
'cm_repo': cm_repo,
24342438
'env': env,
2435-
'image_repo': image_repo,
24362439
'interactive': interactive,
24372440
'mounts': mounts,
2438-
'image_name': image_name,
24392441
# 'image_tag': script_alias,
24402442
'image_tag_extra': image_tag_extra,
24412443
'detached': detached,
@@ -2452,6 +2454,12 @@ def docker(i):
24522454
}
24532455
}
24542456

2457+
if image_repo:
2458+
cm_docker_input['image_repo'] = image_repo
2459+
2460+
if image_name:
2461+
cm_docker_input['image_name'] = image_name
2462+
24552463
if all_gpus:
24562464
cm_docker_input['all_gpus'] = True
24572465

0 commit comments

Comments
 (0)