From 1650135cf526bdcde9f0a54f61793471f48b60b5 Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:25:41 +0530 Subject: [PATCH 1/2] Map rocm and gpu to cuda --- .../customize.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/script/app-mlperf-inference-mlcommons-python/customize.py b/script/app-mlperf-inference-mlcommons-python/customize.py index 80eb8ba57..391549470 100644 --- a/script/app-mlperf-inference-mlcommons-python/customize.py +++ b/script/app-mlperf-inference-mlcommons-python/customize.py @@ -218,7 +218,10 @@ def get_run_cmd(os_info, env, scenario_extra_options, def get_run_cmd_reference( os_info, env, scenario_extra_options, mode_extra_options, dataset_options): - + + device = env['MLC_MLPERF_DEVICE'] if env['MLC_MLPERF_DEVICE'] not in [ + "gpu", "rocm"] else "cuda" + if env['MLC_MODEL'] in ["gptj-99", "gptj-99.9"]: env['RUN_DIR'] = os.path.join( @@ -352,8 +355,6 @@ def get_run_cmd_reference( "fid")) backend = env['MLC_MLPERF_BACKEND'] - device = env['MLC_MLPERF_DEVICE'] if env['MLC_MLPERF_DEVICE'] not in [ - "gpu", "rocm"] else "cuda" max_batchsize = env.get('MLC_MLPERF_LOADGEN_MAX_BATCHSIZE', '1') cmd = env['MLC_PYTHON_BIN_WITH_PATH'] + " main.py " \ " --scenario " + env['MLC_MLPERF_LOADGEN_SCENARIO'] + \ @@ -377,7 +378,6 @@ def get_run_cmd_reference( "language", "llama2-70b") backend = env['MLC_MLPERF_BACKEND'] - device = env['MLC_MLPERF_DEVICE'] if env['MLC_MLPERF_DEVICE'] != "gpu" else "cuda" cmd = env['MLC_PYTHON_BIN_WITH_PATH'] + " main.py " \ " --scenario " + env['MLC_MLPERF_LOADGEN_SCENARIO'] + \ @@ -410,7 +410,6 @@ def get_run_cmd_reference( "language", "mixtral-8x7b") backend = env['MLC_MLPERF_BACKEND'] - device = env['MLC_MLPERF_DEVICE'] if env['MLC_MLPERF_DEVICE'] != "gpu" else "cuda" cmd = env['MLC_PYTHON_BIN_WITH_PATH'] + " main.py " \ " --scenario " + env['MLC_MLPERF_LOADGEN_SCENARIO'] + \ " --dataset-path " + env['MLC_DATASET_MIXTRAL_PREPROCESSED_PATH'] + \ @@ -488,8 +487,7 @@ def get_run_cmd_reference( mode_extra_options += " --dataset igbh-dgl --profile rgat-dgl-full " else: mode_extra_options += " --dataset igbh-dgl-tiny --profile debug-dgl " - - device = env['MLC_MLPERF_DEVICE'] if env['MLC_MLPERF_DEVICE'] != "gpu" else "cuda" + # have to add the condition for running in debug mode or real run mode cmd = env['MLC_PYTHON_BIN_WITH_PATH'] + " main.py " \ " --scenario " + env['MLC_MLPERF_LOADGEN_SCENARIO'] + \ From e50ea66e7bfc0337366bb786457caf5d2906db90 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 21 Feb 2025 09:55:57 +0000 Subject: [PATCH 2/2] [Automated Commit] Format Codebase [skip ci] --- script/app-mlperf-inference-mlcommons-python/customize.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/app-mlperf-inference-mlcommons-python/customize.py b/script/app-mlperf-inference-mlcommons-python/customize.py index 391549470..bbdff3f7c 100644 --- a/script/app-mlperf-inference-mlcommons-python/customize.py +++ b/script/app-mlperf-inference-mlcommons-python/customize.py @@ -218,10 +218,10 @@ def get_run_cmd(os_info, env, scenario_extra_options, def get_run_cmd_reference( os_info, env, scenario_extra_options, mode_extra_options, dataset_options): - + device = env['MLC_MLPERF_DEVICE'] if env['MLC_MLPERF_DEVICE'] not in [ - "gpu", "rocm"] else "cuda" - + "gpu", "rocm"] else "cuda" + if env['MLC_MODEL'] in ["gptj-99", "gptj-99.9"]: env['RUN_DIR'] = os.path.join( @@ -487,7 +487,7 @@ def get_run_cmd_reference( mode_extra_options += " --dataset igbh-dgl --profile rgat-dgl-full " else: mode_extra_options += " --dataset igbh-dgl-tiny --profile debug-dgl " - + # have to add the condition for running in debug mode or real run mode cmd = env['MLC_PYTHON_BIN_WITH_PATH'] + " main.py " \ " --scenario " + env['MLC_MLPERF_LOADGEN_SCENARIO'] + \