Skip to content

Commit

Permalink
Merge pull request #222 from mlcommons/main
Browse files Browse the repository at this point in the history
syncing main -> dev (can be avoided if we follow the right order of syncing branches)
  • Loading branch information
gfursin authored Sep 17, 2024
2 parents 14972b4 + 122f402 commit 5fcbb31
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 1 deletion.
12 changes: 11 additions & 1 deletion script/app-mlperf-inference-nvidia/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,21 @@ variations:
# MLPerf inference version
v4.1:
group: version
default: true
env:
CM_MLPERF_INFERENCE_CODE_VERSION: "v4.1"
adr:
pytorch:
tags: _for-nvidia-mlperf-inference-v4.1

v4.1-dev:
group: version
default: true
env:
CM_MLPERF_INFERENCE_CODE_VERSION: "v4.0"
adr:
pytorch:
tags: _for-nvidia-mlperf-inference-v4.0

v4.0:
group: version
env:
Expand All @@ -339,6 +348,7 @@ variations:
adr:
pytorch:
tags: _for-nvidia-mlperf-inference-v3.1

# Target devices
cpu:
group: device
Expand Down
1 change: 1 addition & 0 deletions script/app-mlperf-inference/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,7 @@ variations:
CM_ENV_NVMITTEN_DOCKER_WHEEL_PATH: '/opt/nvmitten-0.1.3-cp38-cp38-linux_x86_64.whl'

#uses public code for inference v4.1

r4.1-dev_default:
group:
reproducibility
Expand Down
12 changes: 12 additions & 0 deletions script/get-generic-sys-util/_cm.json
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,18 @@
}
}
},
"wkhtmltopdf": {
"env": {
"CM_SYS_UTIL_NAME": "wkhtmltopdf",
"CM_SYS_UTIL_CHECK_CMD": "wkhtmltopdf --version"
},
"state": {
"wkhtmltopdf": {
"apt": "wkhtmltopdf",
"brew": "wkhtmltopdf"
}
}
},
"xz": {
"env": {
"CM_SYS_UTIL_NAME": "xz"
Expand Down
3 changes: 3 additions & 0 deletions script/get-generic-sys-util/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ def preprocess(i):
if env['CM_SYS_UTIL_NAME'] == "numactl" and env['CM_HOST_OS_VERSION'] in [ "9.1", "9.2", "9.3" ]:
env['CM_SYS_UTIL_INSTALL_CMD'] = ''

if env.get('CM_SYS_UTIL_CHECK_CMD', '') != '' and env['CM_SYS_UTIL_INSTALL_CMD'] != '':
env['CM_SYS_UTIL_INSTALL_CMD'] = f"""{env['CM_SYS_UTIL_CHECK_CMD']} || {env['CM_SYS_UTIL_INSTALL_CMD']}"""

return {'return':0}
32 changes: 32 additions & 0 deletions script/install-apt-package/_cm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"alias": "install-apt-package",
"automation_alias": "script",
"automation_uid": "5b4e0237da074764",
"cache": true,
"category": "Detection or installation of tools and artifacts",
"default_env": {
"CM_CLEAN_DIRS": "bin",
"CM_SUDO": "sudo"
},
"deps": [
{
"tags": "detect,os"
}
],
"new_env_keys": [
],
"tags": [
"get",
"install",
"apt-package",
"package"
],
"uid": "3688efcd8f324546",
"variations": {
"package.#": {
"env": {
"CM_APT_PACKAGE_NAME": "#"
}
}
}
}
24 changes: 24 additions & 0 deletions script/install-apt-package/customize.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from cmind import utils
import os
import re

def preprocess(i):

os_info = i['os_info']

env = i['env']
state = i['state']
package_name = env['CM_APT_PACKAGE_NAME']

install_cmd = env.get('CM_HOST_OS_PACKAGE_MANAGER_INSTALL_CMD')
if not install_cmd:
return {'return': 1, 'error': 'Package manager installation command not detected for the given OS'}

sudo = env.get('CM_SUDO', '')

env['CM_APT_INSTALL_CMD'] = sudo + ' ' +install_cmd + ' ' + package_name

if env.get('CM_APT_CHECK_CMD', '') != '' and env['CM_APT_INSTALL_CMD'] != '':
env['CM_APT_INSTALL_CMD'] = f"""{env['CM_APT_CHECK_CMD']} || {env['CM_APT_INSTALL_CMD']}"""

return {'return':0}
6 changes: 6 additions & 0 deletions script/install-apt-package/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

cmd=${CM_APT_INSTALL_CMD}
echo $cmd
eval $cmd
test $? -eq 0 || exit $?

0 comments on commit 5fcbb31

Please sign in to comment.