From 506040ad0a8de7983935740f7e151a208affeef2 Mon Sep 17 00:00:00 2001 From: intellinjun <105184542+intellinjun@users.noreply.github.com> Date: Fri, 24 May 2024 13:51:20 +0800 Subject: [PATCH 1/2] Update cpp_graph_inference.sh --- tests/model-test/cpp_graph_inference.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/model-test/cpp_graph_inference.sh b/tests/model-test/cpp_graph_inference.sh index 52dc9610d..aade5f20e 100644 --- a/tests/model-test/cpp_graph_inference.sh +++ b/tests/model-test/cpp_graph_inference.sh @@ -468,9 +468,9 @@ function main() { if [[ ${input} == "1024" && ${cores_per_instance} == "32" ]]; then echo "-------- Accuracy start--------" if [[ "${model}" == "llama"* || "${model}" == "gptj-6b" ]]; then - python ./scripts/cal_acc.py --model_name ${model_path} --init_from_bin ${model}-${precision}.bin --batch_size 8 --tasks lambada_openai 2>&1 | tee ${WORKSPACE}/accuracy-${logs_file} + OMP_NUM_THREADS=56 numactl -l -C 0-55 python ./scripts/cal_acc.py --model_name ${model_path} --init_from_bin ${model}-${precision}.bin --batch_size 8 --tasks lambada_openai 2>&1 | tee ${WORKSPACE}/accuracy-${logs_file} else - python ./scripts/cal_acc.py --model_name ${model_path} --init_from_bin ${model}-${precision}.bin --tasks lambada_openai --batch_size 1 2>&1 | tee ${WORKSPACE}/accuracy-${logs_file} + OMP_NUM_THREADS=56 numactl -l -C 0-55 python ./scripts/cal_acc.py --model_name ${model_path} --init_from_bin ${model}-${precision}.bin --tasks lambada_openai --batch_size 1 2>&1 | tee ${WORKSPACE}/accuracy-${logs_file} fi else echo "-------- Accuracy End --------" From a0f47477a6a1db67bc68f3f71262833176eb9306 Mon Sep 17 00:00:00 2001 From: intellinjun <105184542+intellinjun@users.noreply.github.com> Date: Fri, 24 May 2024 13:52:38 +0800 Subject: [PATCH 2/2] Update cpp_graph_inference.sh --- .github/workflows/scripts/models/cpp_graph_inference.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/models/cpp_graph_inference.sh b/.github/workflows/scripts/models/cpp_graph_inference.sh index 518fa14e0..8fc086c0c 100644 --- a/.github/workflows/scripts/models/cpp_graph_inference.sh +++ b/.github/workflows/scripts/models/cpp_graph_inference.sh @@ -148,7 +148,7 @@ function main() { $infer_cmd --seed 1234 -t $cores_per_instance -b 2047 -c ${ctx} -n ${output} -m ${model}-${precision}.bin -p "$prompt" 2>&1 | tee ${WORKING_DIR}/${logs_file} || true & monitor if [[ ${precision} == "q4_j_b32" ]]&&[[ ${input} == "1024" ]]&&[[ "${model}" == "llama3-8b" ]]; then - python ./scripts/cal_acc.py --model_name ${input_model} --init_from_bin ${model}-${precision}.bin --tasks lambada_openai --batch_size 8 2>&1 | tee -a ${WORKING_DIR}/${logs_file} + OMP_NUM_THREADS=56 numactl -l -C 0-55 python ./scripts/cal_acc.py --model_name ${input_model} --init_from_bin ${model}-${precision}.bin --tasks lambada_openai --batch_size 8 2>&1 | tee -a ${WORKING_DIR}/${logs_file} else echo "-------- Inference End --------" fi