From 1678be98f1e90e16206455cf46ee670e5d8269f0 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 11 Feb 2025 22:46:31 +0000 Subject: [PATCH 01/17] Update customize.py | Use Path instead of string in inference-submission-generation --- .../customize.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index 3245e1893..9e061b066 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -535,17 +535,16 @@ def generate_submission(env, state, inp, submission_division): measurements_json = json.load(f) model_precision = measurements_json.get( "weight_data_types", "fp32") - shutil.copy( - measurements_json_path, - os.path.join( - target_measurement_json_path, - sub_res + '.json')) - shutil.copy( - measurements_json_path, - os.path.join( - target_measurement_json_path, - 'model-info.json')) + # Convert paths to Path objects + measurements_json_path = Path(measurements_json_path) + target_measurement_json_path = Path(target_measurement_json_path) + + destination = Path(target_measurement_json_path) / f"{sub_res}.json" + shutil.copy(measurements_json_path, destination) + destination = Path(target_measurement_json_path) / "model-info.json" + shutil.copy(measurements_json_path, destination) + else: if mode.lower() == "performance": return { From d12122e8b2ca804c0fe38c42aab6b42b31d441b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Feb 2025 22:46:45 +0000 Subject: [PATCH 02/17] [Automated Commit] Format Codebase --- .../generate-mlperf-inference-submission/customize.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index 9e061b066..dcbe3e2e6 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -538,13 +538,16 @@ def generate_submission(env, state, inp, submission_division): # Convert paths to Path objects measurements_json_path = Path(measurements_json_path) - target_measurement_json_path = Path(target_measurement_json_path) + target_measurement_json_path = Path( + target_measurement_json_path) - destination = Path(target_measurement_json_path) / f"{sub_res}.json" + destination = Path( + target_measurement_json_path) / f"{sub_res}.json" shutil.copy(measurements_json_path, destination) - destination = Path(target_measurement_json_path) / "model-info.json" + destination = Path( + target_measurement_json_path) / "model-info.json" shutil.copy(measurements_json_path, destination) - + else: if mode.lower() == "performance": return { From c56fd7faa2e6475abae5384dcd9316c746a0f595 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 11 Feb 2025 22:47:35 +0000 Subject: [PATCH 03/17] Update build_wheel.yml --- .github/workflows/build_wheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 64f1789e4..ba82117cf 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -11,6 +11,7 @@ on: - VERSION jobs: + build_wheels: if: github.repository_owner == 'mlcommons' name: Build wheel From e3cdfd01afdd85391be2013397c484efde5fe008 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 11 Feb 2025 22:49:01 +0000 Subject: [PATCH 04/17] Update format.yml --- .github/workflows/format.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 8523dbfc5..3fd479b11 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -59,6 +59,6 @@ jobs: git config --global user.name github-actions[bot] git config --global user.email "github-actions[bot]@users.noreply.github.com" # Commit changes - git commit -m '[Automated Commit] Format Codebase' + git commit -m '[Automated Commit] Format Codebase [skip ci]' git push fi From 4fd949fa772deeac680057af966d384e5c5151a8 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 11 Feb 2025 22:49:59 +0000 Subject: [PATCH 05/17] Update customize.py --- script/activate-python-venv/customize.py | 1 + 1 file changed, 1 insertion(+) diff --git a/script/activate-python-venv/customize.py b/script/activate-python-venv/customize.py index 2740bb9d8..20ee8f2cf 100644 --- a/script/activate-python-venv/customize.py +++ b/script/activate-python-venv/customize.py @@ -1,4 +1,5 @@ from mlc import utils + import os From 35ffa705ac12b49171bd5497cee4b55594271677 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 11 Feb 2025 22:51:18 +0000 Subject: [PATCH 06/17] Update customize.py --- script/generate-mlperf-inference-submission/customize.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index dcbe3e2e6..417e313d6 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -538,8 +538,7 @@ def generate_submission(env, state, inp, submission_division): # Convert paths to Path objects measurements_json_path = Path(measurements_json_path) - target_measurement_json_path = Path( - target_measurement_json_path) + target_measurement_json_path = Path(target_measurement_json_path) destination = Path( target_measurement_json_path) / f"{sub_res}.json" From 1a98efbc077db0e816e708a7851cc016e93831bc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Feb 2025 22:51:33 +0000 Subject: [PATCH 07/17] [Automated Commit] Format Codebase [skip ci] --- script/generate-mlperf-inference-submission/customize.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index 417e313d6..dcbe3e2e6 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -538,7 +538,8 @@ def generate_submission(env, state, inp, submission_division): # Convert paths to Path objects measurements_json_path = Path(measurements_json_path) - target_measurement_json_path = Path(target_measurement_json_path) + target_measurement_json_path = Path( + target_measurement_json_path) destination = Path( target_measurement_json_path) / f"{sub_res}.json" From f510241bde244cb59163f9763657b50c3d4a5938 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 11 Feb 2025 22:52:42 +0000 Subject: [PATCH 08/17] Update build_wheel.yml --- .github/workflows/build_wheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index ba82117cf..7d3caf1e7 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -10,6 +10,7 @@ on: paths: - VERSION + jobs: build_wheels: From 6a5e5d9417f098a2ad3d9ec0cfa434560cc67c55 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 11 Feb 2025 22:59:58 +0000 Subject: [PATCH 09/17] Update customize.py --- script/generate-mlperf-inference-submission/customize.py | 1 + 1 file changed, 1 insertion(+) diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index dcbe3e2e6..46686f497 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -5,6 +5,7 @@ import sys from tabulate import tabulate import mlperf_utils +from pathlib import Path def preprocess(i): From 0408de05962332dd0faffa5b160471a513809e01 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 12 Feb 2025 04:34:02 +0530 Subject: [PATCH 10/17] Added quotes for filepath in get-platform-details --- script/get-platform-details/run.sh | 156 ++++++++++++++--------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/script/get-platform-details/run.sh b/script/get-platform-details/run.sh index 2336146e1..843d1cba7 100644 --- a/script/get-platform-details/run.sh +++ b/script/get-platform-details/run.sh @@ -2,137 +2,137 @@ OUTPUT_FILE="$MLC_PLATFORM_DETAILS_FILE_PATH" #set -e -#echo $OUTPUT_FILE +#echo "${OUTPUT_FILE}" echo "WARNING: sudo permission is needed for some of the below commands" -echo "Platform Details" > $OUTPUT_FILE -echo "" >> $OUTPUT_FILE -echo "------------------------------------------------------------" >> $OUTPUT_FILE -echo "1. uname -a" >> $OUTPUT_FILE -eval "uname -a" >> $OUTPUT_FILE +echo "Platform Details" > "${OUTPUT_FILE}" +echo "" >> "${OUTPUT_FILE}" +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" +echo "1. uname -a" >> "${OUTPUT_FILE}" +eval "uname -a" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "2. w" >> $OUTPUT_FILE -eval "w" >> $OUTPUT_FILE +echo "2. w" >> "${OUTPUT_FILE}" +eval "w" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "3. Username" >> $OUTPUT_FILE -eval "whoami" >> $OUTPUT_FILE -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "3. Username" >> "${OUTPUT_FILE}" +eval "whoami" >> "${OUTPUT_FILE}" +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "4. ulimit -a" >> $OUTPUT_FILE -eval "ulimit -a" >> $OUTPUT_FILE +echo "4. ulimit -a" >> "${OUTPUT_FILE}" +eval "ulimit -a" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "5. sysinfo process ancestry" >> $OUTPUT_FILE -eval "pstree" >> $OUTPUT_FILE +echo "5. sysinfo process ancestry" >> "${OUTPUT_FILE}" +eval "pstree" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "6. /proc/cpuinfo" >> $OUTPUT_FILE -eval "cat /proc/cpuinfo" >> $OUTPUT_FILE +echo "6. /proc/cpuinfo" >> "${OUTPUT_FILE}" +eval "cat /proc/cpuinfo" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "7. lscpu" >> $OUTPUT_FILE -eval "lscpu" >> $OUTPUT_FILE +echo "7. lscpu" >> "${OUTPUT_FILE}" +eval "lscpu" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "8. numactl --hardware" >> $OUTPUT_FILE +echo "8. numactl --hardware" >> "${OUTPUT_FILE}" if [[ ${MLC_SUDO_USER} == "yes" ]]; then echo "${MLC_SUDO} numactl --hardware" - eval "${MLC_SUDO} numactl --hardware" >> $OUTPUT_FILE + eval "${MLC_SUDO} numactl --hardware" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? else - echo "Requires SUDO permission" >> $OUTPUT_FILE + echo "Requires SUDO permission" >> "${OUTPUT_FILE}" fi -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "9. /proc/meminfo" >> $OUTPUT_FILE -eval "cat /proc/meminfo" >> $OUTPUT_FILE +echo "9. /proc/meminfo" >> "${OUTPUT_FILE}" +eval "cat /proc/meminfo" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "10. who -r" >> $OUTPUT_FILE -eval "who -r" >> $OUTPUT_FILE +echo "10. who -r" >> "${OUTPUT_FILE}" +eval "who -r" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "11. Systemd service manager version" >> $OUTPUT_FILE -eval "systemctl --version | head -n 1" >> $OUTPUT_FILE +echo "11. Systemd service manager version" >> "${OUTPUT_FILE}" +eval "systemctl --version | head -n 1" >> "${OUTPUT_FILE}" #test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "12. Services, from systemctl list-unit-files" >> $OUTPUT_FILE -eval "systemctl list-unit-files" >> $OUTPUT_FILE +echo "12. Services, from systemctl list-unit-files" >> "${OUTPUT_FILE}" +eval "systemctl list-unit-files" >> "${OUTPUT_FILE}" #test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "13. Linux kernel boot-time arguments, from /proc/cmdline" >> $OUTPUT_FILE -eval "cat /proc/cmdline" >> $OUTPUT_FILE +echo "13. Linux kernel boot-time arguments, from /proc/cmdline" >> "${OUTPUT_FILE}" +eval "cat /proc/cmdline" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "14. cpupower frequency-info" >> $OUTPUT_FILE -eval "cpupower frequency-info" >> $OUTPUT_FILE -test $? -eq 0 || echo "FAILED: cpupower frequency-info" >> $OUTPUT_FILE -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "14. cpupower frequency-info" >> "${OUTPUT_FILE}" +eval "cpupower frequency-info" >> "${OUTPUT_FILE}" +test $? -eq 0 || echo "FAILED: cpupower frequency-info" >> "${OUTPUT_FILE}" +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "15. sysctl" >> $OUTPUT_FILE +echo "15. sysctl" >> "${OUTPUT_FILE}" if [[ ${MLC_SUDO_USER} == "yes" ]]; then echo "${MLC_SUDO} sysctl -a" - eval "${MLC_SUDO} sysctl -a" >> $OUTPUT_FILE + eval "${MLC_SUDO} sysctl -a" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? else - echo "Requires SUDO permission" >> $OUTPUT_FILE + echo "Requires SUDO permission" >> "${OUTPUT_FILE}" fi -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "16. /sys/kernel/mm/transparent_hugepage" >> $OUTPUT_FILE -eval "cat /sys/kernel/mm/transparent_hugepage/enabled" >> $OUTPUT_FILE +echo "16. /sys/kernel/mm/transparent_hugepage" >> "${OUTPUT_FILE}" +eval "cat /sys/kernel/mm/transparent_hugepage/enabled" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "17. /sys/kernel/mm/transparent_hugepage/khugepaged" >> $OUTPUT_FILE -eval "cat /sys/kernel/mm/transparent_hugepage/khugepaged/defrag" >> $OUTPUT_FILE +echo "17. /sys/kernel/mm/transparent_hugepage/khugepaged" >> "${OUTPUT_FILE}" +eval "cat /sys/kernel/mm/transparent_hugepage/khugepaged/defrag" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "18. OS release" >> $OUTPUT_FILE -eval "cat /etc/os-release" >> $OUTPUT_FILE +echo "18. OS release" >> "${OUTPUT_FILE}" +eval "cat /etc/os-release" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "19. Disk information" >> $OUTPUT_FILE -eval "lsblk" >> $OUTPUT_FILE +echo "19. Disk information" >> "${OUTPUT_FILE}" +eval "lsblk" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "20. /sys/devices/virtual/dmi/id" >> $OUTPUT_FILE -eval "ls /sys/devices/virtual/dmi/id" >> $OUTPUT_FILE +echo "20. /sys/devices/virtual/dmi/id" >> "${OUTPUT_FILE}" +eval "ls /sys/devices/virtual/dmi/id" >> "${OUTPUT_FILE}" test $? -eq 0 || exit $? -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "21. dmidecode" >> $OUTPUT_FILE +echo "21. dmidecode" >> "${OUTPUT_FILE}" if [[ ${MLC_SUDO_USER} == "yes" ]]; then - eval "${MLC_SUDO} dmidecode" >> $OUTPUT_FILE - test $? -eq 0 || echo "FAILED: dmidecode" >> $OUTPUT_FILE + eval "${MLC_SUDO} dmidecode" >> "${OUTPUT_FILE}" + test $? -eq 0 || echo "FAILED: dmidecode" >> "${OUTPUT_FILE}" else - echo "Requires SUDO permission" >> $OUTPUT_FILE + echo "Requires SUDO permission" >> "${OUTPUT_FILE}" fi -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "22. BIOS" >> $OUTPUT_FILE +echo "22. BIOS" >> "${OUTPUT_FILE}" if [[ ${MLC_SUDO_USER} == "yes" ]]; then - eval "${MLC_SUDO} dmidecode -t bios" >> $OUTPUT_FILE - test $? -eq 0 || echo "FAILED: dmidecode -t bios" >> $OUTPUT_FILE + eval "${MLC_SUDO} dmidecode -t bios" >> "${OUTPUT_FILE}" + test $? -eq 0 || echo "FAILED: dmidecode -t bios" >> "${OUTPUT_FILE}" else - echo "Requires SUDO permission" >> $OUTPUT_FILE + echo "Requires SUDO permission" >> "${OUTPUT_FILE}" fi -echo "------------------------------------------------------------" >> $OUTPUT_FILE +echo "------------------------------------------------------------" >> "${OUTPUT_FILE}" -echo "System information has been saved to $OUTPUT_FILE" +echo "System information has been saved to "${OUTPUT_FILE}"" From e412af20a12ab85af6abd60936750635fae615f5 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 12 Feb 2025 04:36:22 +0530 Subject: [PATCH 11/17] Added quote for R50 mlperf run on windows --- script/app-mlperf-inference-mlcommons-python/customize.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/app-mlperf-inference-mlcommons-python/customize.py b/script/app-mlperf-inference-mlcommons-python/customize.py index b7c0a5efc..df85eb7e1 100644 --- a/script/app-mlperf-inference-mlcommons-python/customize.py +++ b/script/app-mlperf-inference-mlcommons-python/customize.py @@ -250,9 +250,9 @@ def get_run_cmd_reference( 'MLC_MLPERF_DEVICE') != "tpu": if os_info['platform'] == 'windows': cmd = "python python/main.py --profile " + env['MLC_MODEL'] + "-" + env['MLC_MLPERF_BACKEND'] + \ - " --model=" + env['MLC_ML_MODEL_FILE_WITH_PATH'] + ' --dataset-path=' + env['MLC_DATASET_PREPROCESSED_PATH'] + \ - " --scenario " + env['MLC_MLPERF_LOADGEN_SCENARIO'] + " " + \ - " --output " + env['OUTPUT_DIR'] + " " + \ + " --model=\"" + env['MLC_ML_MODEL_FILE_WITH_PATH'] + '" --dataset-path="' + env['MLC_DATASET_PREPROCESSED_PATH'] + \ + "\" --scenario " + env['MLC_MLPERF_LOADGEN_SCENARIO'] + " " + \ + " --output \"" + env['OUTPUT_DIR'] + "\" " + \ env['MLC_MLPERF_LOADGEN_EXTRA_OPTIONS'] + \ scenario_extra_options + mode_extra_options + dataset_options else: From 9bd521e090fe5c4776740dc058e0e50cfbd5a704 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 12 Feb 2025 04:48:12 +0530 Subject: [PATCH 12/17] Added quotes for file paths in draw-graph-from-json-data --- script/draw-graph-from-json-data/customize.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/draw-graph-from-json-data/customize.py b/script/draw-graph-from-json-data/customize.py index 77affa7e3..28c905d2c 100644 --- a/script/draw-graph-from-json-data/customize.py +++ b/script/draw-graph-from-json-data/customize.py @@ -14,13 +14,13 @@ def preprocess(i): quiet = (env.get('MLC_QUIET', False) == 'yes') - env['MLC_RUN_CMD'] = f"""{env['MLC_PYTHON_BIN_WITH_PATH']} {os.path.join(env['MLC_TMP_CURRENT_SCRIPT_PATH'],"process-mlc-deps.py")} {env['MLC_JSON_INPUT_FILE']}""" + env['MLC_RUN_CMD'] = f"""{env['MLC_PYTHON_BIN_WITH_PATH']} "{os.path.join(env['MLC_TMP_CURRENT_SCRIPT_PATH'],"process-mlc-deps.py")}" "{env['MLC_JSON_INPUT_FILE']}" """ if env.get('MLC_OUTPUT_IMAGE_PATH', '') != '': - env['MLC_RUN_CMD'] += f""" --output_image {env['MLC_OUTPUT_IMAGE_PATH']}""" + env['MLC_RUN_CMD'] += f""" --output_image "{env['MLC_OUTPUT_IMAGE_PATH']}" """ if env.get('MLC_OUTPUT_MERMAID_PATH', '') != '': - env['MLC_RUN_CMD'] += f""" --output_mermaid {env['MLC_OUTPUT_MERMAID_PATH']}""" + env['MLC_RUN_CMD'] += f""" --output_mermaid "{env['MLC_OUTPUT_MERMAID_PATH']}" """ return {'return': 0} From 0fea89d1f2cd5317e938a7c6f3eeb01ed089f5c1 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 12 Feb 2025 04:55:50 +0530 Subject: [PATCH 13/17] Added quotes for file paths in draw-graph-from-json-data --- script/draw-graph-from-json-data/customize.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script/draw-graph-from-json-data/customize.py b/script/draw-graph-from-json-data/customize.py index 28c905d2c..56c734da3 100644 --- a/script/draw-graph-from-json-data/customize.py +++ b/script/draw-graph-from-json-data/customize.py @@ -13,14 +13,15 @@ def preprocess(i): automation = i['automation'] quiet = (env.get('MLC_QUIET', False) == 'yes') + q = '"' if os_info['platform'] == 'windows' else "'" - env['MLC_RUN_CMD'] = f"""{env['MLC_PYTHON_BIN_WITH_PATH']} "{os.path.join(env['MLC_TMP_CURRENT_SCRIPT_PATH'],"process-mlc-deps.py")}" "{env['MLC_JSON_INPUT_FILE']}" """ + env['MLC_RUN_CMD'] = f"""{env['MLC_PYTHON_BIN_WITH_PATH']} {q}{os.path.join(env['MLC_TMP_CURRENT_SCRIPT_PATH'],"process-mlc-deps.py")}{q} {q}{env['MLC_JSON_INPUT_FILE']}{q} """ if env.get('MLC_OUTPUT_IMAGE_PATH', '') != '': - env['MLC_RUN_CMD'] += f""" --output_image "{env['MLC_OUTPUT_IMAGE_PATH']}" """ + env['MLC_RUN_CMD'] += f""" --output_image {q}{env['MLC_OUTPUT_IMAGE_PATH']}{q} """ if env.get('MLC_OUTPUT_MERMAID_PATH', '') != '': - env['MLC_RUN_CMD'] += f""" --output_mermaid "{env['MLC_OUTPUT_MERMAID_PATH']}" """ + env['MLC_RUN_CMD'] += f""" --output_mermaid {q}{env['MLC_OUTPUT_MERMAID_PATH']}{q} """ return {'return': 0} From a13f2f3b64f7e8009517ab84f04b3f3a696cf581 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 12 Feb 2025 04:57:57 +0530 Subject: [PATCH 14/17] Added quotes for file paths in draw-graph-from-json-data --- script/generate-mlperf-inference-submission/customize.py | 1 - 1 file changed, 1 deletion(-) diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index 46686f497..44e30849b 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -72,7 +72,6 @@ def generate_submission(env, state, inp, submission_division): sys.path.append(submission_checker_dir) if env.get('MLC_MLPERF_INFERENCE_SUBMISSION_DIR', '') == '': - from pathlib import Path user_home = str(Path.home()) env['MLC_MLPERF_INFERENCE_SUBMISSION_DIR'] = os.path.join( user_home, "mlperf_submission") From f6d1570ac0b9017bc71449e0e214f4efa9777757 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 12 Feb 2025 05:10:00 +0530 Subject: [PATCH 15/17] Avoid space in mlperf-inference-submission --- script/generate-mlperf-inference-submission/customize.py | 4 ++-- script/get-mlperf-inference-sut-configs/customize.py | 2 +- script/get-mlperf-inference-sut-description/customize.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index 44e30849b..025365e77 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -275,7 +275,7 @@ def generate_submission(env, state, inp, submission_division): {model: returned_model_name}) if check_dict_filled(sut_info.keys(), sut_info): - system = env.get('MLC_HW_NAME', sut_info["system_name"]) + system = env.get('MLC_HW_NAME', sut_info["system_name"]).replace(" ", "_") implementation = sut_info["implementation"] device = sut_info["device"] framework = sut_info["framework"].replace(" ", "_") @@ -283,7 +283,7 @@ def generate_submission(env, state, inp, submission_division): run_config = sut_info["run_config"] new_res = f"{system}-{implementation}-{device}-{framework}-{run_config}" else: - new_res = res + new_res = res.replace(" ", "_") print(f"The SUT folder name for submission generation is: {new_res}") diff --git a/script/get-mlperf-inference-sut-configs/customize.py b/script/get-mlperf-inference-sut-configs/customize.py index e8b1e7be7..a2f605ae5 100644 --- a/script/get-mlperf-inference-sut-configs/customize.py +++ b/script/get-mlperf-inference-sut-configs/customize.py @@ -13,7 +13,7 @@ def postprocess(i): 'MLC_HOST_SYSTEM_NAME', 'default').replace( "-", - "_") + "_").replace(" ", "_") env['MLC_HW_NAME'] = host_name device = env.get('MLC_MLPERF_DEVICE', 'cpu') diff --git a/script/get-mlperf-inference-sut-description/customize.py b/script/get-mlperf-inference-sut-description/customize.py index aaadf5be0..93746764e 100644 --- a/script/get-mlperf-inference-sut-description/customize.py +++ b/script/get-mlperf-inference-sut-description/customize.py @@ -17,7 +17,7 @@ def preprocess(i): 'MLC_HOST_SYSTEM_NAME', 'default').replace( "-", - "_") + "_").replace(" ", "_") env['MLC_HW_NAME'] = host_name auto_detected_hw_name = True From 3803d88c0b0fce012f30e324e939e4a813c35580 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Feb 2025 23:40:22 +0000 Subject: [PATCH 16/17] [Automated Commit] Format Codebase [skip ci] --- script/generate-mlperf-inference-submission/customize.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/generate-mlperf-inference-submission/customize.py b/script/generate-mlperf-inference-submission/customize.py index 025365e77..0d1ac5a69 100644 --- a/script/generate-mlperf-inference-submission/customize.py +++ b/script/generate-mlperf-inference-submission/customize.py @@ -275,7 +275,11 @@ def generate_submission(env, state, inp, submission_division): {model: returned_model_name}) if check_dict_filled(sut_info.keys(), sut_info): - system = env.get('MLC_HW_NAME', sut_info["system_name"]).replace(" ", "_") + system = env.get( + 'MLC_HW_NAME', + sut_info["system_name"]).replace( + " ", + "_") implementation = sut_info["implementation"] device = sut_info["device"] framework = sut_info["framework"].replace(" ", "_") From f2b12ce7c6b81c7f2d4d7bfe70833bc6df6b4815 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 11 Feb 2025 23:41:38 +0000 Subject: [PATCH 17/17] Update build_wheel.yml --- .github/workflows/build_wheel.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 7d3caf1e7..ba82117cf 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -10,7 +10,6 @@ on: paths: - VERSION - jobs: build_wheels: