From 33343c18a89693a081d4dfca38f1528f6e0d0564 Mon Sep 17 00:00:00 2001 From: "shengyan.zhao" Date: Wed, 18 Mar 2026 14:16:26 +0800 Subject: [PATCH] Dynamically detect site-packages to support any Python version (not just 3.10) Signed-off-by: shengyan.zhao --- tests/run_igie.py | 2 +- tests/run_ixrt.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/run_igie.py b/tests/run_igie.py index 8716fbbb..41ef4752 100644 --- a/tests/run_igie.py +++ b/tests/run_igie.py @@ -598,7 +598,7 @@ def run_nlp_testcase(model, batch_size): """ if model_name == "transformer" and platform.machine() == "aarch64": base_script += """ - export LD_PRELOAD=$(find /usr/local/lib/python3.10/site-packages/scikit_learn.libs -name "libgomp*.so.1.0.0" | head -n1) + export LD_PRELOAD=$(find /usr/local/lib/python3.*/site-packages/scikit_learn.libs -name "libgomp*.so.1.0.0" | head -n1) export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libGLdispatch.so.0:$LD_PRELOAD """ for prec in model["precisions"]: diff --git a/tests/run_ixrt.py b/tests/run_ixrt.py index dfe12410..61a86fad 100644 --- a/tests/run_ixrt.py +++ b/tests/run_ixrt.py @@ -642,7 +642,7 @@ def run_nlp_testcase(model, batch_size, whl_url): if model_name == "transformer" and platform.machine() == "aarch64": script = f""" set -x - export LD_PRELOAD=$(find /usr/local/lib/python3.10/site-packages/scikit_learn.libs -name "libgomp*.so.1.0.0" | head -n1) + export LD_PRELOAD=$(find /usr/local/lib/python3.*/site-packages/scikit_learn.libs -name "libgomp*.so.1.0.0" | head -n1) export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libGLdispatch.so.0:$LD_PRELOAD cd ../{model['model_path']}/ bash scripts/infer_{model_name}_{prec}_accuracy.sh @@ -660,7 +660,7 @@ def run_nlp_testcase(model, batch_size, whl_url): if model_name == "transformer" and platform.machine() == "aarch64": script = f""" set -x - export LD_PRELOAD=$(find /usr/local/lib/python3.10/site-packages/scikit_learn.libs -name "libgomp*.so.1.0.0" | head -n1) + export LD_PRELOAD=$(find /usr/local/lib/python3.*/site-packages/scikit_learn.libs -name "libgomp*.so.1.0.0" | head -n1) export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libGLdispatch.so.0:$LD_PRELOAD cd ../{model['model_path']}/ bash scripts/infer_{model_name}_{prec}_accuracy.sh --bs {bs} -- Gitee