From f61130539bcf71db2ebc57e451d20f7c569410e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=96=87=E5=B0=A7?= <18848977154@163.com> Date: Tue, 6 May 2025 14:43:35 +0800 Subject: [PATCH 1/5] tensorflow --- .../2.4.1/data.tensorflow.arm.cpu.kgcc.config | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config diff --git a/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config b/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config new file mode 100644 index 0000000..921f09a --- /dev/null +++ b/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config @@ -0,0 +1,83 @@ +[SERVER] +11.11.11.11 + +[DOWNLOAD] +tensorflow/2.4.1 https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.4.1.tar.gz tensorflow-2.4.1.tar.gz + +[DEPENDENCY] +set -e +set -x + +yum install -y vim tar git wget +module purge +./jarvis -install package/anaconda3/2023.3 any +source ${JARVIS_ROOT}/software/utils/anaconda3/2023.3/etc/profile.d/conda.sh +./jarvis -install kgcc/10.3.1 com +module use software/modulefiles +module load kgcc/10.3.1 +export CC=`which gcc` +export CXX=`which g++` +export FC=`which gfortran` +sudo yum install -y glibc-devel +pip install cython +tar -xzvf ${JARVIS_DOWNLOAD}/tensorflow-2.4.1.tar.gz +mkdir -p tensorflow + +[ENV] +yum install -y vim tar git wget +module purge +source ${JARVIS_ROOT}/software/utils/anaconda3/2023.3/etc/profile.d/conda.sh +module use software/modulefiles +module load kgcc/10.3.1 +export CC=`which gcc` +export CXX=`which g++` +export FC=`which gfortran` +sudo yum install -y glibc-devel +pip install cython + +[APP] +app_name = tensorflow +build_dir = ${JARVIS_ROOT}/tensorflow-2.4.1/ +binary_dir = +case_dir = ${JARVIS_ROOT}/tensorflow-2.4.1/tensorflow/examples/speech_commands/ + + +[BUILD] +#conda env remove -n tensorflow-2.4.1 +conda create -n tensorflow-2.4.1 bazel=3.7 python=3.7.11 -y +conda activate tensorflow-2.4.1 +conda install -c conda-forge keras-preprocessing=1.1.2 numpy=1.18.5 -y + +yes '' | python configure.py +bazel build //tensorflow/tools/pip_package:build_pip_package +bazel-bin/tensorflow/tools/pip_package/build_pip_package ${JARVIS_ROOT}/tensorflow +cd ${JARVIS_ROOT}/tensorflow +pip install tensorflow-2.4.1-cp37-cp37m-linux_aarch64.whl --no-deps +conda install -c anaconda absl-py -y +pip install google-api-python-client +pip install protobuf==3.20.1 # 选择一个 3.20.x 的版本 +conda install -c conda-forge wrapt -y +conda install -c conda-forge typing_extensions -y +conda install -c conda-forge opt_einsum -y +pip install gast==0.4.0 +pip install astunparse==1.6.3 +pip install --force-reinstall termcolor +pip install flatbuffers==23.5.9 + + +[CLEAN] +make clean + +[RUN] +run = conda activate tensorflow-2.4.1 && time python train.py +binary = +nodes = 1 + +[JOB] +conda activate tensorflow-2.4.1 + +[PERF] +perf= +nsys= +ncu=--target-processes all + -- Gitee From 4acbb7005f5e1d6a0c1989cd0c5d8a7020bcf6f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=96=87=E5=B0=A7?= <18848977154@163.com> Date: Wed, 7 May 2025 11:08:31 +0800 Subject: [PATCH 2/5] tensorflow --- .../2.4.1/data.tensorflow.arm.cpu.kgcc.config | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config b/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config index 921f09a..dd53461 100644 --- a/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config +++ b/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config @@ -24,7 +24,6 @@ tar -xzvf ${JARVIS_DOWNLOAD}/tensorflow-2.4.1.tar.gz mkdir -p tensorflow [ENV] -yum install -y vim tar git wget module purge source ${JARVIS_ROOT}/software/utils/anaconda3/2023.3/etc/profile.d/conda.sh module use software/modulefiles @@ -32,8 +31,6 @@ module load kgcc/10.3.1 export CC=`which gcc` export CXX=`which g++` export FC=`which gfortran` -sudo yum install -y glibc-devel -pip install cython [APP] app_name = tensorflow @@ -43,7 +40,10 @@ case_dir = ${JARVIS_ROOT}/tensorflow-2.4.1/tensorflow/examples/speech_commands/ [BUILD] -#conda env remove -n tensorflow-2.4.1 +if conda env list | grep -wq "\btensorflow-2.4.1\b"; then + echo "环境 tensorflow-2.4.1 存在" + conda env remove -n tensorflow-2.4.1 +fi conda create -n tensorflow-2.4.1 bazel=3.7 python=3.7.11 -y conda activate tensorflow-2.4.1 conda install -c conda-forge keras-preprocessing=1.1.2 numpy=1.18.5 -y @@ -66,7 +66,7 @@ pip install flatbuffers==23.5.9 [CLEAN] -make clean +./jarvis -CLS [RUN] run = conda activate tensorflow-2.4.1 && time python train.py -- Gitee From 41d8c6328bb299559007c804691e190d48aeb95d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=96=87=E5=B0=A7?= <18848977154@163.com> Date: Wed, 7 May 2025 11:44:27 +0800 Subject: [PATCH 3/5] tensorflow --- .../tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config b/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config index dd53461..e0885a0 100644 --- a/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config +++ b/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config @@ -11,9 +11,10 @@ set -x yum install -y vim tar git wget module purge ./jarvis -install package/anaconda3/2023.3 any -source ${JARVIS_ROOT}/software/utils/anaconda3/2023.3/etc/profile.d/conda.sh -./jarvis -install kgcc/10.3.1 com module use software/modulefiles +module load anaconda3/2023.3 +source ${ANACONDA3_PATH}/etc/profile.d/conda.sh +./jarvis -install kgcc/10.3.1 com module load kgcc/10.3.1 export CC=`which gcc` export CXX=`which g++` @@ -25,8 +26,9 @@ mkdir -p tensorflow [ENV] module purge -source ${JARVIS_ROOT}/software/utils/anaconda3/2023.3/etc/profile.d/conda.sh module use software/modulefiles +module load anaconda3/2023.3 +source ${ANACONDA3_PATH}/etc/profile.d/conda.sh module load kgcc/10.3.1 export CC=`which gcc` export CXX=`which g++` -- Gitee From 6435cbad42f9dcade52ada5f9fdb1a38726b940d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=96=87=E5=B0=A7?= <18848977154@163.com> Date: Wed, 7 May 2025 14:38:06 +0800 Subject: [PATCH 4/5] tensorflow --- .../tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config b/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config index e0885a0..dd53461 100644 --- a/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config +++ b/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config @@ -11,10 +11,9 @@ set -x yum install -y vim tar git wget module purge ./jarvis -install package/anaconda3/2023.3 any -module use software/modulefiles -module load anaconda3/2023.3 -source ${ANACONDA3_PATH}/etc/profile.d/conda.sh +source ${JARVIS_ROOT}/software/utils/anaconda3/2023.3/etc/profile.d/conda.sh ./jarvis -install kgcc/10.3.1 com +module use software/modulefiles module load kgcc/10.3.1 export CC=`which gcc` export CXX=`which g++` @@ -26,9 +25,8 @@ mkdir -p tensorflow [ENV] module purge +source ${JARVIS_ROOT}/software/utils/anaconda3/2023.3/etc/profile.d/conda.sh module use software/modulefiles -module load anaconda3/2023.3 -source ${ANACONDA3_PATH}/etc/profile.d/conda.sh module load kgcc/10.3.1 export CC=`which gcc` export CXX=`which g++` -- Gitee From b8b17dffd0f5458ea1369913d4a976620efbd04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=96=87=E5=B0=A7?= <18848977154@163.com> Date: Fri, 9 May 2025 16:38:31 +0800 Subject: [PATCH 5/5] tensorflow --- templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config b/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config index dd53461..6278fb0 100644 --- a/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config +++ b/templates/tensorflow/2.4.1/data.tensorflow.arm.cpu.kgcc.config @@ -66,7 +66,7 @@ pip install flatbuffers==23.5.9 [CLEAN] -./jarvis -CLS +conda clean --all --yes [RUN] run = conda activate tensorflow-2.4.1 && time python train.py -- Gitee