From 2ba815e1d5d974215d4e76e09250e9ba92331ffb Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 22 Oct 2024 02:20:29 +0530 Subject: [PATCH] Export VERSION for mlperf inference src --- script/get-mlperf-inference-src/_cm.json | 1 + script/get-mlperf-inference-src/customize.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/script/get-mlperf-inference-src/_cm.json b/script/get-mlperf-inference-src/_cm.json index 9bd2f4c3a..2b62b7f5a 100644 --- a/script/get-mlperf-inference-src/_cm.json +++ b/script/get-mlperf-inference-src/_cm.json @@ -32,6 +32,7 @@ "CM_MLPERF_INFERENCE_GPTJ_PATH", "CM_MLPERF_INFERENCE_RNNT_PATH", "CM_MLPERF_INFERENCE_SOURCE", + "CM_MLPERF_INFERENCE_SOURCE_VERSION", "CM_MLPERF_INFERENCE_VERSION", "CM_MLPERF_INFERENCE_VISION_PATH", "CM_MLPERF_LAST_RELEASE", diff --git a/script/get-mlperf-inference-src/customize.py b/script/get-mlperf-inference-src/customize.py index 63b2a5989..de2b83b9c 100644 --- a/script/get-mlperf-inference-src/customize.py +++ b/script/get-mlperf-inference-src/customize.py @@ -101,6 +101,11 @@ def postprocess(i): env['+PYTHONPATH']=[] env['+PYTHONPATH'].append(os.path.join(env['CM_MLPERF_INFERENCE_CLASSIFICATION_AND_DETECTION_PATH'], 'python')) + if os.path.exists(os.path.join(inference_root, "loadgen", "VERSION")): + with open(os.path.join(inference_root, "loadgen", "VERSION") as f: + version_info = f.read() + env['CM_MLPERF_INFERENCE_SOURCE_VERSION'] = version_info + if env.get('CM_GET_MLPERF_IMPLEMENTATION_ONLY', '') == "yes": return {'return':0}