From c8bdd9b5d35cf4311be04ff6289b010682d8c481 Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Wed, 23 Apr 2025 18:32:17 +0530 Subject: [PATCH 1/9] Fix for dataset path with space --- vision/classification_and_detection/run_local.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vision/classification_and_detection/run_local.sh b/vision/classification_and_detection/run_local.sh index 680160d334..a84d5084fe 100755 --- a/vision/classification_and_detection/run_local.sh +++ b/vision/classification_and_detection/run_local.sh @@ -19,7 +19,7 @@ while [ -n "$1" ]; do shift done -cmd="python3 python/main.py --profile $profile $common_opt --model \"$model_path\" $dataset \ +cmd="python3 python/main.py --profile $profile $common_opt --model \"$model_path\" \"$dataset\" \ --output \"$OUTPUT_DIR\" $EXTRA_OPS ${ARGS}" if [[ $EXTRA_OPS == *"tpu"* ]]; then From 366adda871102d3d229efbffecb2621c766571cf Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Wed, 23 Apr 2025 22:34:58 +0530 Subject: [PATCH 2/9] Update run_local.sh --- vision/classification_and_detection/run_local.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vision/classification_and_detection/run_local.sh b/vision/classification_and_detection/run_local.sh index a84d5084fe..5800ff7e7b 100755 --- a/vision/classification_and_detection/run_local.sh +++ b/vision/classification_and_detection/run_local.sh @@ -3,7 +3,7 @@ source ./run_common.sh common_opt="" -dataset="--dataset-path $DATA_DIR" +dataset="--dataset-path \"$DATA_DIR\"" OUTPUT_DIR=${OUTPUT_DIR:-`pwd`/output/$name} if [ ! -d "$OUTPUT_DIR" ]; then mkdir -p "$OUTPUT_DIR" @@ -19,7 +19,7 @@ while [ -n "$1" ]; do shift done -cmd="python3 python/main.py --profile $profile $common_opt --model \"$model_path\" \"$dataset\" \ +cmd="python3 python/main.py --profile $profile $common_opt --model \"$model_path\" $dataset \ --output \"$OUTPUT_DIR\" $EXTRA_OPS ${ARGS}" if [[ $EXTRA_OPS == *"tpu"* ]]; then From 1acee38875dc8b8123b8ddf833f6a3181d43507c Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Wed, 23 Apr 2025 22:37:28 +0530 Subject: [PATCH 3/9] Fix error when path contains space --- compliance/nvidia/TEST01/run_verification.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compliance/nvidia/TEST01/run_verification.py b/compliance/nvidia/TEST01/run_verification.py index 51f265e209..c4bb25c63c 100644 --- a/compliance/nvidia/TEST01/run_verification.py +++ b/compliance/nvidia/TEST01/run_verification.py @@ -102,10 +102,10 @@ def main(): + args.dtype + unixmode + " -r " - + results_dir + + f"{results_dir}" + "/accuracy/mlperf_log_accuracy.json" + " -t " - + compliance_dir + + f"{compliance_dir}" + "/mlperf_log_accuracy.json | tee verify_accuracy.txt" ) try: @@ -132,10 +132,10 @@ def main(): "python3 " + verify_performance_binary + " -r " - + results_dir + + f"{results_dir}" + "/performance/run_1/mlperf_log_summary.txt" + " -t " - + compliance_dir + + f"{compliance_dir}" + "/mlperf_log_summary.txt | tee verify_performance.txt" ) try: From 4f723f4197d5f3c5f3edf57982c83a88e7d1b740 Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Wed, 23 Apr 2025 23:52:35 +0530 Subject: [PATCH 4/9] Update run_verification.py --- compliance/nvidia/TEST01/run_verification.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/compliance/nvidia/TEST01/run_verification.py b/compliance/nvidia/TEST01/run_verification.py index c4bb25c63c..d9add2af43 100644 --- a/compliance/nvidia/TEST01/run_verification.py +++ b/compliance/nvidia/TEST01/run_verification.py @@ -22,6 +22,10 @@ import numpy as np +import platform + +os_type = platform.system() + sys.path.append(os.getcwd()) dtype_map = { @@ -69,7 +73,9 @@ def main(): ) args = parser.parse_args() - + + q = '"' if os_type == 'Windows' else "'" + print("Parsing arguments.") results_dir = args.results_dir compliance_dir = args.compliance_dir @@ -102,10 +108,10 @@ def main(): + args.dtype + unixmode + " -r " - + f"{results_dir}" + + f"""{q}{results_dir}{q}""" + "/accuracy/mlperf_log_accuracy.json" + " -t " - + f"{compliance_dir}" + + f"""{q}{compliance_dir}{q}""" + "/mlperf_log_accuracy.json | tee verify_accuracy.txt" ) try: @@ -132,10 +138,10 @@ def main(): "python3 " + verify_performance_binary + " -r " - + f"{results_dir}" + + f"""{q}{results_dir}{q}""" + "/performance/run_1/mlperf_log_summary.txt" + " -t " - + f"{compliance_dir}" + + f"""{q}{compliance_dir}{q}""" + "/mlperf_log_summary.txt | tee verify_performance.txt" ) try: From c036aa38b3f3dd064e6b4de9b88965a34690a59c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Apr 2025 18:22:58 +0000 Subject: [PATCH 5/9] [Automated Commit] Format Codebase --- compliance/nvidia/TEST01/run_verification.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compliance/nvidia/TEST01/run_verification.py b/compliance/nvidia/TEST01/run_verification.py index d9add2af43..6b093bf1b7 100644 --- a/compliance/nvidia/TEST01/run_verification.py +++ b/compliance/nvidia/TEST01/run_verification.py @@ -73,9 +73,9 @@ def main(): ) args = parser.parse_args() - + q = '"' if os_type == 'Windows' else "'" - + print("Parsing arguments.") results_dir = args.results_dir compliance_dir = args.compliance_dir From 0b2800a5e3a314e4e7eed2f06abefc6ecf1dd001 Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Thu, 24 Apr 2025 00:26:46 +0530 Subject: [PATCH 6/9] Update run_verification.py --- compliance/nvidia/TEST01/run_verification.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/compliance/nvidia/TEST01/run_verification.py b/compliance/nvidia/TEST01/run_verification.py index 6b093bf1b7..7b7b04a9bc 100644 --- a/compliance/nvidia/TEST01/run_verification.py +++ b/compliance/nvidia/TEST01/run_verification.py @@ -103,16 +103,16 @@ def main(): # run verify accuracy verify_accuracy_command = ( "python3 " - + verify_accuracy_binary + + f"""{q}{verify_accuracy_binary}{q}""" + " --dtype " + args.dtype + unixmode + " -r " - + f"""{q}{results_dir}{q}""" - + "/accuracy/mlperf_log_accuracy.json" + + f"""{q}{results_dir}""" + + f"""/accuracy/mlperf_log_accuracy.json{q}""" + " -t " - + f"""{q}{compliance_dir}{q}""" - + "/mlperf_log_accuracy.json | tee verify_accuracy.txt" + + f"""{q}{compliance_dir}""" + + f"""/mlperf_log_accuracy.json{q} | tee verify_accuracy.txt""" ) try: os.system(verify_accuracy_command) @@ -136,13 +136,13 @@ def main(): ) verify_performance_command = ( "python3 " - + verify_performance_binary + + f"""{q}{verify_performance_binary}{q}""" + " -r " - + f"""{q}{results_dir}{q}""" - + "/performance/run_1/mlperf_log_summary.txt" + + f"""{q}{results_dir}""" + + f"""/performance/run_1/mlperf_log_summary.txt{q}""" + " -t " - + f"""{q}{compliance_dir}{q}""" - + "/mlperf_log_summary.txt | tee verify_performance.txt" + + f"""{q}{compliance_dir}""" + + f"""/mlperf_log_summary.txt{q} | tee verify_performance.txt""" ) try: os.system(verify_performance_command) From ebf35c544ea1c198e1f2bdf889914c0380c6bfa9 Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Thu, 24 Apr 2025 05:22:49 +0530 Subject: [PATCH 7/9] Update run_verification.py to handle space in paths --- compliance/nvidia/TEST04/run_verification.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/compliance/nvidia/TEST04/run_verification.py b/compliance/nvidia/TEST04/run_verification.py index 647f71f82a..0da12f1a45 100644 --- a/compliance/nvidia/TEST04/run_verification.py +++ b/compliance/nvidia/TEST04/run_verification.py @@ -19,6 +19,10 @@ import subprocess import argparse +import platform + +os_type = platform.system() + sys.path.append(os.getcwd()) @@ -48,6 +52,8 @@ def main(): args = parser.parse_args() + q = '"' if os_type == 'Windows' else "'" + print("Parsing arguments.") results_dir = args.results_dir compliance_dir = args.compliance_dir @@ -59,13 +65,13 @@ def main(): ) verify_performance_command = ( "python3 " - + verify_performance_binary + + f"""{q}{verify_performance_binary}{q}""" + " -r " - + results_dir - + "/performance/run_1/mlperf_log_summary.txt" + + f"""{q}{results_dir}""" + + f"""/performance/run_1/mlperf_log_summary.txt{q}""" + " -t " - + compliance_dir - + "/mlperf_log_summary.txt | tee verify_performance.txt" + + f"""{q}{compliance_dir}""" + + f"""/mlperf_log_summary.txt{q} | tee verify_performance.txt""" ) try: os.system(verify_performance_command) From c4cf02767053e1ad0d8a4bfd4aaef0c3f0f7f635 Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Wed, 11 Jun 2025 00:19:05 +0530 Subject: [PATCH 8/9] Update run_verification.py --- compliance/nvidia/TEST01/run_verification.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/compliance/nvidia/TEST01/run_verification.py b/compliance/nvidia/TEST01/run_verification.py index 7b7b04a9bc..2833cb79e0 100644 --- a/compliance/nvidia/TEST01/run_verification.py +++ b/compliance/nvidia/TEST01/run_verification.py @@ -108,11 +108,9 @@ def main(): + args.dtype + unixmode + " -r " - + f"""{q}{results_dir}""" - + f"""/accuracy/mlperf_log_accuracy.json{q}""" + + f"""{q}{os.path.join(results_dir, "accuracy", "mlperf_log_accuracy.json")}{q}""" + " -t " - + f"""{q}{compliance_dir}""" - + f"""/mlperf_log_accuracy.json{q} | tee verify_accuracy.txt""" + + f"""{q}{os.path.join(compliance_dir, "mlperf_log_accuracy.json")}{q} | tee verify_accuracy.txt""" ) try: os.system(verify_accuracy_command) @@ -138,11 +136,9 @@ def main(): "python3 " + f"""{q}{verify_performance_binary}{q}""" + " -r " - + f"""{q}{results_dir}""" - + f"""/performance/run_1/mlperf_log_summary.txt{q}""" + + f"""{q}{os.path.join(results_dir, "performance", "run_1", "mlperf_log_summary.txt")}{q}""" + " -t " - + f"""{q}{compliance_dir}""" - + f"""/mlperf_log_summary.txt{q} | tee verify_performance.txt""" + + f"""{q}{os.path.join(compliance_dir, "mlperf_log_summary.txt")}{q} | tee verify_performance.txt""" ) try: os.system(verify_performance_command) From 6657bf71b18a067ecb8bd816a8bee24976bf62e0 Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Wed, 11 Jun 2025 00:23:08 +0530 Subject: [PATCH 9/9] Update run_verification.py --- compliance/nvidia/TEST04/run_verification.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compliance/nvidia/TEST04/run_verification.py b/compliance/nvidia/TEST04/run_verification.py index 0da12f1a45..384982ea67 100644 --- a/compliance/nvidia/TEST04/run_verification.py +++ b/compliance/nvidia/TEST04/run_verification.py @@ -67,11 +67,9 @@ def main(): "python3 " + f"""{q}{verify_performance_binary}{q}""" + " -r " - + f"""{q}{results_dir}""" - + f"""/performance/run_1/mlperf_log_summary.txt{q}""" + + f"""{q}{os.path.join(results_dir, "performance", "run_1", "mlperf_log_summary.txt")}{q}""" + " -t " - + f"""{q}{compliance_dir}""" - + f"""/mlperf_log_summary.txt{q} | tee verify_performance.txt""" + + f"""{q}{os.path.join(compliance_dir, "mlperf_log_summary.txt"}{q} | tee verify_performance.txt""" ) try: os.system(verify_performance_command)