Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 11 additions & 8 deletions script/app-mlperf-inference/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,17 @@ deps:

posthook_deps:
- tags: get,mlperf,sut,description #populate system meta information like framework
- tags: get,platform,details
enable_if_any_env:
CM_SUDO_USER:
- yes
CM_GET_PLATFORM_DETAILS:
- yes
skip_if_env:
CM_MLPERF_LOADGEN_MODE:
- accuracy
env:
CM_PLATFORM_DETAILS_FILE_PATH: '<<<CM_MLPERF_OUTPUT_DIR>>>/system_info.txt'

# Order of variations for documentation
variation_groups_order:
Expand Down Expand Up @@ -1052,14 +1063,6 @@ variations:
- mlperf-accuracy-script
- imagenet-accuracy-script
tags: run,accuracy,mlperf,_imagenet
- tags: get,platform,details
enable_if_any_env:
CM_SUDO_USER:
- yes
CM_GET_PLATFORM_DETAILS:
- yes
env:
CM_PLATFORM_DETAILS_FILE_PATH: '<<<CM_MLPERF_OUTPUT_DIR>>>/system_info.txt'

onnxruntime:
group: backend
Expand Down
8 changes: 3 additions & 5 deletions script/get-platform-details/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@ def preprocess(i):
if os_info['platform'] == "windows":
return {'return':1, 'error':'get-platform-details script not yet supported in windows!'}

print(env['CM_HOST_OS_KERNEL_VERSION'])

if not check_installation("numactl",os_info):
env['CM_INSTALL_NUMACTL'] = 'True'

#if not check_installation("cpupower",os_info):
env['CM_INSTALL_CPUPOWER'] = 'True'

if env.get('CM_PLATFORM_DETAILS_FILE_PATH', '') == '':
env['CM_GET_PLATFORM_DETAILS_FILE_PATH'] = os.path.join(os.getcwd(), "system_info.txt")
if env.get('CM_PLATFORM_DETAILS_FILE_PATH', '') == '':
env['CM_PLATFORM_DETAILS_FILE_PATH'] = os.path.join(os.getcwd(), "system_info.txt")

return {'return':0}
return {'return':0}


def postprocess(i):
Expand Down
7 changes: 4 additions & 3 deletions script/get-platform-details/run.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash

OUTPUT_FILE="system_info.txt"

echo "WARNING: sudo permission is needed to some packages for measuring the platform details"
OUTPUT_FILE="$CM_PLATFORM_DETAILS_FILE_PATH"
set -e
#echo $OUTPUT_FILE
echo "WARNING: sudo permission is needed for some of the below commands"

if [[ ${CM_HOST_OS_FLAVOR} == "macos" ]]; then
echo "WARNING: To be done for the mac os"
Expand Down