Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
c59608e
enable docker-submission generation
anandhu-eng Oct 31, 2024
28ce998
real run set to false
anandhu-eng Oct 31, 2024
2b35b79
docker run set to false
anandhu-eng Oct 31, 2024
3309a35
Update results dir env variable
anandhu-eng Oct 31, 2024
8ffa471
updated docker permissions
anandhu-eng Oct 31, 2024
5ced2d2
update docker permissions
anandhu-eng Oct 31, 2024
3cabfa1
Add docker input mapping
anandhu-eng Oct 31, 2024
5149a0b
enabled modifying input mapping env inside docker
anandhu-eng Oct 31, 2024
44be9bd
update the env key to run command
anandhu-eng Oct 31, 2024
dc2d75c
pass uid and gid args to docker run
anandhu-eng Nov 1, 2024
97ccbc9
added docker run args
anandhu-eng Nov 1, 2024
1634d68
Updated build to run args
anandhu-eng Nov 1, 2024
5795ff3
Update module_misc.py
anandhu-eng Nov 1, 2024
7d6ee2b
clean the contents rather than the main submission folder
anandhu-eng Nov 1, 2024
cb81816
update-prevent deletion of entire directory
anandhu-eng Nov 1, 2024
fc4fea3
test commit
anandhu-eng Nov 1, 2024
fd70fcf
bug fix
anandhu-eng Nov 1, 2024
8cf8d56
bug fix
anandhu-eng Nov 1, 2024
941efef
added mount for submission processed
anandhu-eng Nov 1, 2024
d5554b0
Update docker repo and branch in test
arjunsuresh Nov 4, 2024
893530e
code clean
anandhu-eng Nov 4, 2024
de29f11
code clean
anandhu-eng Nov 4, 2024
434b855
Merge branch 'mlcommons:mlperf-inference' into mlperf-inference
arjunsuresh Nov 4, 2024
356387b
Update test-nvidia-mlperf-implementation.yml
arjunsuresh Nov 4, 2024
a45cca3
Fix nvidia mlperf inference gptj detached mode
arjunsuresh Nov 4, 2024
36e9bad
Update test-nvidia-mlperf-implementation.yml
arjunsuresh Nov 4, 2024
ed2b48a
Update pythonpath for coco2014 accuracy check
arjunsuresh Nov 4, 2024
77c8d25
Update test-scc24-sdxl.yaml
arjunsuresh Nov 4, 2024
ecac7e9
Added docker detatched option
anandhu-eng Nov 4, 2024
468264d
Update test-mlperf-inference-abtf-poc.yml | Enable docker on macos an…
arjunsuresh Nov 4, 2024
ed2d9bf
Merge branch 'mlperf-inference' into anandhu-eng-patch-4
arjunsuresh Nov 4, 2024
a9375a4
Update test-mlperf-inference-abtf-poc.yml
arjunsuresh Nov 4, 2024
e3e4f9f
Update test-mlperf-inference-abtf-poc.yml
arjunsuresh Nov 4, 2024
0a4fbdc
Update test-mlperf-inference-abtf-poc.yml
arjunsuresh Nov 4, 2024
8127ab5
Update test-mlperf-inference-abtf-poc.yml
arjunsuresh Nov 4, 2024
5aa7fb5
Update test-mlperf-inference-abtf-poc.yml | Turn of docker runs on macos
arjunsuresh Nov 4, 2024
18f46a8
Update test-nvidia-mlperf-implementation.yml
arjunsuresh Nov 4, 2024
82c6af2
Update PYTHONPATH for mlperf inference stable diffusion
arjunsuresh Nov 5, 2024
324df6c
code clean
anandhu-eng Nov 5, 2024
569dc12
Handle dynamic env variables
anandhu-eng Nov 5, 2024
18c284c
update state from meta
anandhu-eng Nov 5, 2024
39bedf2
Update PYTHONPATH for mlperf inference stable diffusion
arjunsuresh Nov 5, 2024
659aecc
Added submission base directory
anandhu-eng Nov 5, 2024
536b9ff
seperated inp through cm.access
anandhu-eng Nov 5, 2024
3f521c6
fix typo
anandhu-eng Nov 5, 2024
2377572
Supports submission base dir
anandhu-eng Nov 5, 2024
5fabd94
code clean
anandhu-eng Nov 5, 2024
4c4bec4
Merge pull request #481 from GATEOverflow/mlperf-inference
arjunsuresh Nov 5, 2024
c95819c
consider base submission dir as output dir
anandhu-eng Nov 5, 2024
60c02fa
Added google dns to mlperf-inference docker
arjunsuresh Nov 5, 2024
c3a111d
Merge branch 'mlperf-inference' into mlperf-inference
arjunsuresh Nov 5, 2024
d99cfe3
Merge pull request #484 from GATEOverflow/mlperf-inference
arjunsuresh Nov 5, 2024
4ee3733
fix typo
anandhu-eng Nov 5, 2024
1df3eb1
bug fix
anandhu-eng Nov 5, 2024
a96d211
fix typo
anandhu-eng Nov 5, 2024
5a26cd5
enable test globally
anandhu-eng Nov 5, 2024
d7499a3
Merge pull request #487 from mlcommons/anandhu-eng-patch-5
arjunsuresh Nov 5, 2024
90b4094
Merge branch 'mlperf-inference' into anandhu-eng-patch-3
anandhu-eng Nov 5, 2024
87ccbe0
submission base dir -> tar output
anandhu-eng Nov 5, 2024
152712f
revert commit https://github.com/mlcommons/cm4mlops/pull/486/commits/…
anandhu-eng Nov 5, 2024
a89fa43
get submission directory if base dir not specified - docker
anandhu-eng Nov 5, 2024
bfe6cb6
add tar output dir
anandhu-eng Nov 5, 2024
6e48bdd
Update _cm.json
anandhu-eng Nov 5, 2024
94ef819
Update test-scc24-sdxl.yaml
arjunsuresh Nov 5, 2024
50e7ab1
Merge branch 'mlperf-inference' into mlperf-inference
arjunsuresh Nov 5, 2024
bba6f04
Merge pull request #488 from GATEOverflow/mlperf-inference
arjunsuresh Nov 5, 2024
ab2f528
code clean
anandhu-eng Nov 5, 2024
e0ea139
Merge branch 'mlperf-inference' into anandhu-eng-patch-3
arjunsuresh Nov 5, 2024
d23e18d
Merge pull request #486 from mlcommons/anandhu-eng-patch-3
arjunsuresh Nov 5, 2024
e83e72c
test commit for macos
anandhu-eng Nov 6, 2024
903cd2a
test commit - mac
anandhu-eng Nov 6, 2024
6861de2
check docker info
anandhu-eng Nov 6, 2024
afc3a02
test commit - mac
anandhu-eng Nov 6, 2024
a82bfd9
test commit
anandhu-eng Nov 6, 2024
b9eefb1
deactivated runs for windows and mac os docker
anandhu-eng Nov 6, 2024
717281b
code clean
anandhu-eng Nov 6, 2024
c39d8e0
Merge pull request #477 from mlcommons/anandhu-eng-patch-4
arjunsuresh Nov 6, 2024
2a37d11
Merge branch 'main' into mlperf-inference
arjunsuresh Nov 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-cm-based-submission-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches: [ "main", "dev", "mlperf-inference" ]
paths:
- '.github/workflows/test-cm-based-submission-generation.yml'
# - '**' # kept on for all the path instead of submission generation CM script so that this could help in trapping any bugs in any recent submission checker modification also
# - '!**.md'
- '**'
- '!**.md'
jobs:
submission_generation:
runs-on: ${{ matrix.os }}
Expand Down
71 changes: 65 additions & 6 deletions .github/workflows/test-mlperf-inference-abtf-poc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,26 @@ jobs:
python-version: [ "3.8", "3.12" ]
backend: [ "pytorch" ]
implementation: [ "python" ]
extra-args: [ "--adr.compiler.tags=gcc" ]
docker: [ "", " --docker --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --docker_dt=yes" ]
extra-args: [ "--adr.compiler.tags=gcc", "--env.CM_MLPERF_LOADGEN_BUILD_FROM_SRC=off" ]
exclude:
- os: ubuntu-24.04
python-version: "3.8"
- os: windows-latest
python-version: "3.8"
- os: windows-latest
extra-args: "--adr.compiler.tags=gcc"
extra-args: "--adr.compiler.tags=gcc"
- os: windows-latest
docker: " --docker --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --docker_dt=yes"
# windows docker image is not supported in CM yet
- os: macos-latest
python-version: "3.8"
- os: macos-13
python-version: "3.8"
include:
- os: windows-latest
extra-args: "--env.CM_MLPERF_LOADGEN_BUILD_FROM_SRC=off"
- os: macos-latest
docker: " --docker --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --docker_dt=yes"
- os: macos-13
docker: " --docker --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --docker_dt=yes"

steps:
- uses: actions/checkout@v3
Expand All @@ -47,6 +52,60 @@ jobs:
pip install cmind
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

- name: Install Docker on macos
if: runner.os == 'macOS-deactivated'
run: |
brew update
brew install --cask docker

- name: Start Docker Daemon on macos
if: runner.os == 'macOS-deactivated'
run: |
open /Applications/Docker.app
echo "Starting Docker, this may take a while..."

# Set max attempts and initial wait time
MAX_ATTEMPTS=20
WAIT_TIME=5

# Loop until Docker daemon is up or max attempts reached
attempt=1
while ! docker info > /dev/null 2>&1; do
echo "Attempt $attempt: Waiting for Docker to start..."
sleep $WAIT_TIME
attempt=$((attempt + 1))
WAIT_TIME=$((WAIT_TIME * 2)) # Exponential backoff

if [ $attempt -gt $MAX_ATTEMPTS ]; then
echo "Docker failed to start within the timeout period"
exit 1
fi
done

echo "Docker is up and running"

- name: Install Docker Desktop on Windows
if: runner.os == 'Windows-deactivated'
run: |
choco install docker-desktop --no-progress -y

- name: Start Docker Desktop on Windows
if: runner.os == 'Windows-deactivated'
run: |
Start-Process 'C:\Program Files\Docker\Docker\Docker Desktop.exe'
# Wait until Docker daemon is running
$retryCount = 0
while (!(docker info) -and ($retryCount -lt 10)) {
Write-Output "Waiting for Docker to start..."
Start-Sleep -Seconds 10
$retryCount++
}
if ($retryCount -ge 10) {
throw "Docker failed to start"
}
Write-Output "Docker is up and running"

- name: Test MLPerf Inference ABTF POC using ${{ matrix.backend }} on ${{ matrix.os }}
run: |
cm run script --tags=run-abtf,inference,_poc-demo --test_query_count=2 --adr.cocoeval.version_max=1.5.7 --adr.cocoeval.version_max_usable=1.5.7 --quiet ${{ matrix.extra-args }} -v
cm run script --tags=run-abtf,inference,_poc-demo --test_query_count=2 --adr.cocoeval.version_max=1.5.7 --adr.cocoeval.version_max_usable=1.5.7 --quiet ${{ matrix.extra-args }} ${{ matrix.docker }} -v
4 changes: 2 additions & 2 deletions .github/workflows/test-nvidia-mlperf-implementation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: MLPerf Inference Nvidia implementations

on:
schedule:
- cron: "31 2 * * *" #to be adjusted
- cron: "29 20 * * *" #to be adjusted

jobs:
build_nvidia:
Expand All @@ -21,5 +21,5 @@ jobs:
source gh_action/bin/activate
export CM_REPOS=$HOME/GH_CM
pip install --upgrade cm4mlops
cm run script --tags=run-mlperf,inference,_all-scenarios,_submission,_full,_r4.1-dev --execution_mode=valid --gpu_name=rtx_4090 --model=${{ matrix.model }} --submitter="MLCommons" --hw_name=RTX4090x2 --implementation=nvidia --backend=tensorrt --category=datacenter,edge --division=closed --docker_dt=yes --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --adr.compiler.tags=gcc --device=cuda --use_dataset_from_host=yes --results_dir=$HOME/gh_action_results --submission_dir=$HOME/gh_action_submissions --clean --docker --quiet
cm run script --tags=run-mlperf,inference,_all-scenarios,_submission,_full,_r4.1-dev --preprocess_submission=yes --execution_mode=valid --gpu_name=rtx_4090 --pull_changes=yes --model=${{ matrix.model }} --submitter="MLCommons" --hw_name=RTX4090x2 --implementation=nvidia --backend=tensorrt --category=datacenter,edge --division=closed --docker_dt=yes --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --adr.compiler.tags=gcc --device=cuda --use_dataset_from_host=yes --results_dir=$HOME/gh_action_results --submission_dir=$HOME/gh_action_submissions --clean --docker --quiet
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/gateoverflow/mlperf_inference_unofficial_submissions_v5.0 --repo_branch=main --commit_message="Results from GH action on NVIDIA_RTX4090x2" --quiet --submission_dir=$HOME/gh_action_submissions --hw_name=RTX4090x2
6 changes: 3 additions & 3 deletions .github/workflows/test-scc24-sdxl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: MLPerf inference SDXL (SCC)

on:
schedule:
- cron: "5 2 * * *"
- cron: "20 14 * * *"

jobs:
build_reference:
Expand All @@ -27,7 +27,7 @@ jobs:
pip install --upgrade cm4mlops
pip install tabulate
cm pull repo
cm run script --tags=run-mlperf,inference,_find-performance,_r4.1-dev,_short,_scc24-base --model=sdxl --implementation=reference --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --docker_dt=yes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --precision=float16 --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean
cm run script --tags=run-mlperf,inference,_find-performance,_r4.1-dev,_short,_scc24-base --pull_changes=yes --model=sdxl --implementation=reference --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --docker_dt=yes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --precision=float16 --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean
cm run script --tags=run-mlperf,inference,_r4.1-dev,_short,_scc24-base --model=sdxl --implementation=reference --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --docker_dt=yes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --precision=float16 --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean
cm run script --tags=generate,inference,submission --clean --preprocess_submission=yes --run-checker --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=open --category=datacenter --run_style=test --adr.submission-checker.tags=_short-run --quiet --submitter=MLCommons --submission_dir=$HOME/scc_gh_action_submissions --results_dir=$HOME/scc_gh_action_results/test_results
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/gateoverflow/cm4mlperf-inference --repo_branch=mlperf-inference-results-scc24 --commit_message="Results from self hosted Github actions - NVIDIARTX4090" --quiet --submission_dir=$HOME/scc_gh_action_submissions
Expand All @@ -52,7 +52,7 @@ jobs:
pip install --upgrade cm4mlops
pip install tabulate
cm pull repo
cm run script --tags=run-mlperf,inference,_find-performance,_r4.1-dev,_short,_scc24-base --model=sdxl --implementation=nvidia --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --docker_dt=yes --pull_changes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --hw_name=go-spr --custom_system_nvidia=yes --clean
cm run script --tags=run-mlperf,inference,_find-performance,_r4.1-dev,_short,_scc24-base --pull_changes=yes --model=sdxl --implementation=nvidia --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --docker_dt=yes --pull_changes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --hw_name=go-spr --custom_system_nvidia=yes --clean
cm run script --tags=run-mlperf,inference,_r4.1-dev,_short,_scc24-base --model=sdxl --implementation=nvidia --backend=${{ matrix.backend }} --category=datacenter --scenario=Offline --execution_mode=test --device=${{ matrix.device }} --precision=${{ matrix.precision }} --docker --docker_it=no --docker_cm_repo=gateoverflow@cm4mlops --docker_dt=yes --quiet --results_dir=$HOME/scc_gh_action_results --submission_dir=$HOME/scc_gh_action_submissions --precision=float16 --env.CM_MLPERF_MODEL_SDXL_DOWNLOAD_TO_HOST=yes --clean
cm run script --tags=generate,inference,submission --clean --preprocess_submission=yes --run-checker --tar=yes --env.CM_TAR_OUTFILE=submission.tar.gz --division=open --category=datacenter --run_style=test --adr.submission-checker.tags=_short-run --quiet --submitter=MLCommons --submission_dir=$HOME/scc_gh_action_submissions --results_dir=$HOME/scc_gh_action_results/test_results
cm run script --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/gateoverflow/cm4mlperf-inference --repo_branch=mlperf-inference-results-scc24 --commit_message="Results from self hosted Github actions - NVIDIARTX4090" --quiet --submission_dir=$HOME/scc_gh_action_submissions
23 changes: 22 additions & 1 deletion automation/script/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -4010,6 +4010,19 @@ def update_deps(self, i):

return {'return':0}

##############################################################################
def update_state_from_meta(self, meta, env, state, const, const_state, deps, post_deps, prehook_deps, posthook_deps, new_env_keys, new_state_keys, i):
"""
Updates state and env from meta
Args:
"""

r = update_state_from_meta(meta, env, state, const, const_state, deps, post_deps, prehook_deps, posthook_deps, new_env_keys, new_state_keys, i)
if r['return']>0:
return r

return {'return':0}

##############################################################################
def get_default_path_list(self, i):
default_path_env_key = i.get('default_path_env_key', '')
Expand Down Expand Up @@ -5259,9 +5272,17 @@ def update_state_from_meta(meta, env, state, const, const_state, deps, post_deps
r4 = update_deps(posthook_deps, add_deps_info, True, env)
if r1['return']>0 and r2['return']>0 and r3['return'] > 0 and r4['return'] > 0: return r1

# i would have 'input' when called through cm.access
input_update_env = i.get('input', i)

input_mapping = meta.get('input_mapping', {})
if input_mapping:
update_env_from_input_mapping(env, i['input'], input_mapping)
update_env_from_input_mapping(env, input_update_env, input_mapping)

# handle dynamic env values
r = update_env_with_values(env)
if r['return']>0:
return r

# Possibly restrict this to within docker environment
add_deps_info = meta.get('ad', i.get('ad', {})) #we need to see input here
Expand Down
13 changes: 9 additions & 4 deletions automation/script/module_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,10 @@ def docker(i):
state['docker'] = docker_settings
add_deps_recursive = i.get('add_deps_recursive', {})

r = script_automation.update_state_from_meta(meta, env, state, const, const_state, deps = [], post_deps = [], prehook_deps = [], posthook_deps = [], new_env_keys = [], new_state_keys = [], i = i)
if r['return'] > 0:
return r

r = script_automation._update_state_from_variations(i, meta, variation_tags, variations, env, state, const, const_state, deps = [], post_deps = [], prehook_deps = [], posthook_deps = [], new_env_keys_from_meta = [], new_state_keys_from_meta = [], add_deps_recursive = add_deps_recursive, run_state = {}, recursion_spaces='', verbose = False)
if r['return'] > 0:
return r
Expand Down Expand Up @@ -1916,11 +1920,12 @@ def docker(i):
mounts[index] = new_host_mount+":"+new_container_mount
if host_env_key:
container_env_string += " --env.{}={} ".format(host_env_key, container_env_key)
# check if the below lines are needed when inputs are mapped to container paths
'''for v in docker_input_mapping:

for v in docker_input_mapping:
if docker_input_mapping[v] == host_env_key:
i[v] = container_env_key
'''
i[v] = container_env_key
i_run_cmd[v] = container_env_key

mounts = list(filter(lambda item: item is not None, mounts))

mount_string = "" if len(mounts)==0 else ",".join(mounts)
Expand Down
4 changes: 4 additions & 0 deletions script/app-mlperf-inference-mlcommons-python/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ def get_run_cmd_reference(os_info, env, scenario_extra_options, mode_extra_optio

elif "stable-diffusion-xl" in env['CM_MODEL']:
env['RUN_DIR'] = os.path.join(env['CM_MLPERF_INFERENCE_SOURCE'], "text_to_image")
if env.get('+PYTHONPATH', '') == '':
env['+PYTHONPATH'] = []
env['+PYTHONPATH'].append(os.path.join(env['CM_MLPERF_INFERENCE_SOURCE'], "text_to_image", "tools", "fid"))

backend = env['CM_MLPERF_BACKEND']
device = env['CM_MLPERF_DEVICE'] if env['CM_MLPERF_DEVICE'] not in [ "gpu", "rocm" ] else "cuda"
max_batchsize = env.get('CM_MLPERF_LOADGEN_MAX_BATCHSIZE', '1')
Expand Down
2 changes: 1 addition & 1 deletion script/app-mlperf-inference/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ docker:
skip_run_cmd: 'no'
shm_size: '32gb'
interactive: True
extra_run_args: ' --ulimit memlock=-1 --cap-add SYS_ADMIN --cap-add SYS_TIME --security-opt apparmor=unconfined --security-opt seccomp=unconfined'
extra_run_args: ' --dns 8.8.8.8 --dns 8.8.4.4 --ulimit memlock=-1 --cap-add SYS_ADMIN --cap-add SYS_TIME --security-opt apparmor=unconfined --security-opt seccomp=unconfined'
os: ubuntu
cm_repo: mlcommons@cm4mlops
cm_repo_branch: mlperf-inference
Expand Down
44 changes: 43 additions & 1 deletion script/generate-mlperf-inference-submission/_cm.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"run_style": "CM_MLPERF_RUN_STYLE",
"skip_truncation": "CM_SKIP_TRUNCATE_ACCURACY",
"submission_dir": "CM_MLPERF_INFERENCE_SUBMISSION_DIR",
"submission_base_dir": "CM_MLPERF_INFERENCE_SUBMISSION_BASE_DIR",
"clean": "CM_MLPERF_CLEAN_SUBMISSION_DIR",
"hw_name": "CM_HW_NAME",
"sw_notes_extra": "CM_MLPERF_SUT_SW_NOTES_EXTRA",
Expand Down Expand Up @@ -120,5 +121,46 @@
"mlperf-inference-submission",
"mlcommons-inference-submission"
],
"uid": "5f8ab2d0b5874d53"
"uid": "5f8ab2d0b5874d53",
"docker": {
"use_host_group_id": true,
"use_host_user_id": true,
"real_run": false,
"deps": [
{
"tags": "get,mlperf,inference,results,dir,local",
"names": "get-mlperf-inference-results-dir",
"skip_if_env": {
"CM_MLPERF_INFERENCE_RESULTS_DIR_": [
"on"
]
}
},
{
"tags": "get,mlperf,inference,submission,dir,local",
"names": "get-mlperf-inference-submission-dir",
"skip_if_any_env": {
"CM_MLPERF_INFERENCE_SUBMISSION_BASE_DIR": [
"on"
]
}
}
],
"pre_run_cmds": [
"cm pull repo"
],
"mounts": [
"${{ CM_MLPERF_INFERENCE_SUBMISSION_BASE_DIR }}:${{ CM_MLPERF_INFERENCE_SUBMISSION_BASE_DIR }}",
"${{ CM_MLPERF_INFERENCE_RESULTS_DIR_ }}:${{ CM_MLPERF_INFERENCE_RESULTS_DIR_ }}"
],
"extra_run_args": " --cap-add SYS_ADMIN",
"os": "ubuntu",
"cm_repo": "mlcommons@cm4mlops",
"cm_repo_branch": "mlperf-inference",
"os_version": "22.04",
"docker_input_mapping": {
"submission_base_dir": "CM_MLPERF_INFERENCE_SUBMISSION_BASE_DIR",
"results_dir": "CM_MLPERF_INFERENCE_RESULTS_DIR_"
}
}
}
11 changes: 9 additions & 2 deletions script/generate-mlperf-inference-submission/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,19 @@ def generate_submission(i):
env['CM_MLPERF_INFERENCE_SUBMISSION_DIR'] = os.path.join(user_home, "mlperf_submission")

submission_dir = env.get('CM_MLPERF_INFERENCE_SUBMISSION_DIR', '')
if submission_dir == '':
submission_base_dir = env.get('CM_MLPERF_INFERENCE_SUBMISSION_BASE_DIR', '')
if submission_base_dir == '':
return {'return':1, 'error':f"Both CM_MLPERF_INFERENCE_SUBMISSION_DIR and CM_MLPERF_INFERENCE_SUBMISSION_BASE_DIR can not be empty!"}
else:
submission_dir = os.path.join(submission_base_dir, "mlperf_inference_submission")
env['CM_MLPERF_INFERENCE_SUBMISSION_DIR'] = submission_dir

if env.get('CM_MLPERF_CLEAN_SUBMISSION_DIR','')!='':
print ('=================================================')
print ('Cleaning {} ...'.format(env['CM_MLPERF_INFERENCE_SUBMISSION_DIR']))
if os.path.exists(env['CM_MLPERF_INFERENCE_SUBMISSION_DIR']):
shutil.rmtree(env['CM_MLPERF_INFERENCE_SUBMISSION_DIR'])
if os.path.exists(submission_dir):
shutil.rmtree(submission_dir)
print ('=================================================')

if not os.path.isdir(submission_dir):
Expand Down
3 changes: 3 additions & 0 deletions script/get-mlperf-inference-sut-description/_cm.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"automation_uid": "5b4e0237da074764",
"cache": false,
"category": "MLPerf benchmark support",
"docker": {
"run": false
},
"deps": [
{
"tags": "detect,os"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ def postprocess(i):
shutil.copytree(submission_dir, submission_backup)
shutil.rmtree(submission_dir)
os.rename(submission_processed, submission_dir)

return {'return':0}
2 changes: 1 addition & 1 deletion script/process-mlperf-accuracy/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def preprocess(i):


elif dataset == "coco2014":
env['+PYTHONPATH'] = [ os.path.join(env['CM_MLPERF_INFERENCE_SOURCE'], "text_to_image", "tools") ]
env['+PYTHONPATH'] = [ os.path.join(env['CM_MLPERF_INFERENCE_SOURCE'], "text_to_image", "tools") , os.path.join(env['CM_MLPERF_INFERENCE_SOURCE'], "text_to_image", "tools", "fid") ]
extra_options = ""

if env.get('CM_SDXL_STATISTICS_FILE_PATH', '') != '':
Expand Down
1 change: 1 addition & 0 deletions script/run-mlperf-inference-app/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def preprocess(i):
inp = {}
if str(docker_dt).lower() in ["yes", "true", "1"]:
env['CM_DOCKER_REUSE_EXISTING_CONTAINER'] = 'no' # turning it off for the first run and after that we turn it on
env['CM_DOCKER_DETACHED_MODE'] = 'yes'

if env.get('CM_DOCKER_IMAGE_NAME', '') != '':
docker_extra_input['docker_image_name'] = env['CM_DOCKER_IMAGE_NAME']
Expand Down
Loading