From 61be577822651d6e4fc2edd229b1e2205c983355 Mon Sep 17 00:00:00 2001 From: Yury Gaydaychuk Date: Mon, 31 Jul 2023 17:57:50 +0200 Subject: [PATCH] [CPU][Commit slider] Add commit to preprocess args (#18677) --- .../tools/commit_slider/utils/cfg_samples/blob_cmp.json | 2 +- .../tools/commit_slider/utils/cfg_samples/bm_output.json | 2 +- .../tools/commit_slider/utils/cfg_samples/bm_perf.json | 2 +- .../tools/commit_slider/utils/cfg_samples/e2e.json | 2 +- src/plugins/intel_cpu/tools/commit_slider/utils/helpers.py | 6 +++--- .../tools/commit_slider/utils/preprocess/replace.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/blob_cmp.json b/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/blob_cmp.json index 412cccc7931..35b95d8e392 100644 --- a/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/blob_cmp.json +++ b/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/blob_cmp.json @@ -1,5 +1,5 @@ { - "makeCmd" : "cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=OFF -DTHREADING=TBB -DENABLE_INTEL_GPU=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_MODELS=OFF -DENABLE_SAMPLES=ON -DENABLE_TESTS=OFF -DENABLE_HETERO=OFF -DENABLE_TEMPLATE=OFF -DENABLE_CPU_DEBUG_CAPS=ON -DENABLE_DEBUG_CAPS=ON -DENABLE_OPENVINO_DEBUG=ON ..", + "makeCmd" : "cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=OFF -DTHREADING=TBB -DENABLE_INTEL_GPU=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_MODELS=OFF -DENABLE_SAMPLES=ON -DENABLE_TESTS=OFF -DENABLE_HETERO=OFF -DENABLE_TEMPLATE=OFF -DENABLE_CPU_DEBUG_CAPS=ON -DENABLE_DEBUG_CAPS=ON -DENABLE_OPENVINO_DEBUG=ON -DCMAKE_CXX_FLAGS=-Wno-deprecated -DCMAKE_C_FLAGS=-Wno-deprecated -DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_FLAGS=-Wno-deprecated-declarations ..", "appCmd" : "./benchmark_app -m -t 10", "envVars" : [ {"name" : "OV_CPU_BLOB_DUMP_NODE_TYPE", "val" : "Output"}, diff --git a/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/bm_output.json b/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/bm_output.json index a0389f9b955..0ac6815058e 100644 --- a/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/bm_output.json +++ b/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/bm_output.json @@ -1,6 +1,6 @@ { "appCmd" : "./benchmark_app -m -d CPU -t 10", - "makeCmd" : "cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=OFF -DTHREADING=TBB -DENABLE_INTEL_GPU=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_MODELS=OFF -DENABLE_SAMPLES=ON -DENABLE_TESTS=OFF -DENABLE_HETERO=OFF -DENABLE_TEMPLATE=OFF -DENABLE_CPU_DEBUG_CAPS=OFF -DENABLE_DEBUG_CAPS=OFF -DENABLE_OPENVINO_DEBUG=OFF ..", + "makeCmd" : "cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=OFF -DTHREADING=TBB -DENABLE_INTEL_GPU=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_MODELS=OFF -DENABLE_SAMPLES=ON -DENABLE_TESTS=OFF -DENABLE_HETERO=OFF -DENABLE_TEMPLATE=OFF -DENABLE_CPU_DEBUG_CAPS=OFF -DENABLE_DEBUG_CAPS=OFF -DENABLE_OPENVINO_DEBUG=OFF -DCMAKE_CXX_FLAGS=-Wno-deprecated -DCMAKE_C_FLAGS=-Wno-deprecated -DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_FLAGS=-Wno-deprecated-declarations ..", "runConfig" : { "commitList" : { "getCommitListCmd" : "git log .. --boundary --pretty=\"%h\"" diff --git a/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/bm_perf.json b/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/bm_perf.json index 44c2b1fffbe..1925f479c23 100644 --- a/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/bm_perf.json +++ b/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/bm_perf.json @@ -1,6 +1,6 @@ { "appCmd" : "./benchmark_app -m -d CPU -hint throughput -inference_only=false -t 60", - "makeCmd" : "cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=OFF -DTHREADING=TBB -DENABLE_INTEL_GPU=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_MODELS=OFF -DENABLE_SAMPLES=ON -DENABLE_TESTS=OFF -DENABLE_HETERO=OFF -DENABLE_TEMPLATE=OFF -DENABLE_CPU_DEBUG_CAPS=OFF -DENABLE_DEBUG_CAPS=OFF -DENABLE_OPENVINO_DEBUG=OFF ..", + "makeCmd" : "cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=OFF -DTHREADING=TBB -DENABLE_INTEL_GPU=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_MODELS=OFF -DENABLE_SAMPLES=ON -DENABLE_TESTS=OFF -DENABLE_HETERO=OFF -DENABLE_TEMPLATE=OFF -DENABLE_CPU_DEBUG_CAPS=OFF -DENABLE_DEBUG_CAPS=OFF -DENABLE_OPENVINO_DEBUG=OFF -DCMAKE_CXX_FLAGS=-Wno-deprecated -DCMAKE_C_FLAGS=-Wno-deprecated -DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_FLAGS=-Wno-deprecated-declarations ..", "runConfig" : { "commitList" : { "getCommitListCmd" : "git log .. --boundary --pretty=\"%h\"" diff --git a/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/e2e.json b/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/e2e.json index 5d381e521a3..6d5251c55b2 100644 --- a/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/e2e.json +++ b/src/plugins/intel_cpu/tools/commit_slider/utils/cfg_samples/e2e.json @@ -7,7 +7,7 @@ {"name" : "MO_ROOT", "val" : "//tools/mo/openvino/tools/"}, {"name" : "OPENVINO_ROOT_DIR", "val" : "//"} ], - "makeCmd" : "cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.8 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.8 -DTHREADING=TBB -DENABLE_INTEL_GPU=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_MODELS=OFF -DENABLE_SAMPLES=OFF -DENABLE_TESTS=OFF -DENABLE_CPU_DEBUG_CAPS=OFF -DENABLE_HETERO=OFF -DENABLE_TEMPLATE=OFF -DENABLE_CPU_DEBUG_CAPS=OFF -DENABLE_DEBUG_CAPS=OFF -DENABLE_OPENVINO_DEBUG=OFF ..", + "makeCmd" : "cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.8 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.8 -DTHREADING=TBB -DENABLE_INTEL_GPU=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_MODELS=OFF -DENABLE_SAMPLES=OFF -DENABLE_TESTS=OFF -DENABLE_CPU_DEBUG_CAPS=OFF -DENABLE_HETERO=OFF -DENABLE_TEMPLATE=OFF -DENABLE_CPU_DEBUG_CAPS=OFF -DENABLE_DEBUG_CAPS=OFF -DENABLE_OPENVINO_DEBUG=OFF -DCMAKE_CXX_FLAGS=-Wno-deprecated -DCMAKE_C_FLAGS=-Wno-deprecated -DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations -DCMAKE_C_FLAGS=-Wno-deprecated-declarations ..", "runConfig" : { "commitList" : { "getCommitListCmd" : "git log .. --boundary --pretty=\"%h\"" diff --git a/src/plugins/intel_cpu/tools/commit_slider/utils/helpers.py b/src/plugins/intel_cpu/tools/commit_slider/utils/helpers.py index a7c0142c19f..97d8056c204 100644 --- a/src/plugins/intel_cpu/tools/commit_slider/utils/helpers.py +++ b/src/plugins/intel_cpu/tools/commit_slider/utils/helpers.py @@ -101,10 +101,10 @@ def absolutizePaths(cfg): path = cfg[item] path = os.path.abspath(path) cfg[item] = path - if "preprocess" in cfg["runConfig"]: + if "preprocess" in cfg["runConfig"] and "file" in cfg["runConfig"]["preprocess"]: prepFile = cfg["runConfig"]["preprocess"]["file"] prepFile = os.path.abspath(prepFile) - cfg["runConfig"]["preprocommArgcess"]["file"] = prepFile + cfg["runConfig"]["preprocess"]["file"] = prepFile if "envVars" in cfg: updatedEnvVars = [] for env in cfg["envVars"]: @@ -176,7 +176,7 @@ def runCommandList(commit, cfgData, enforceClean=False): "utils.preprocess.{pp}".format(pp=prePrName) ) preProcess = getattr(mod, prePrName) - preProcess(cfgData) + preProcess(cfgData, commit) continue makeCmd = cfgData["makeCmd"] strCommand = cmd["cmd"].format(commit=commit, makeCmd=makeCmd) diff --git a/src/plugins/intel_cpu/tools/commit_slider/utils/preprocess/replace.py b/src/plugins/intel_cpu/tools/commit_slider/utils/preprocess/replace.py index 6b604a494b7..c6c39af6416 100644 --- a/src/plugins/intel_cpu/tools/commit_slider/utils/preprocess/replace.py +++ b/src/plugins/intel_cpu/tools/commit_slider/utils/preprocess/replace.py @@ -2,7 +2,7 @@ import re import fileinput -def replace(cfg): +def replace(cfg, commit): prepCfg = cfg["runConfig"]["preprocess"] filePath = prepCfg["file"] pattern = prepCfg["pattern"]