File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1818 export USE_CUDNN=OFF
1919%endif
2020
21- export MAX_JOBS=%compiling_processes
21+ MEM_GB=$(/usr/bin/free -g | awk '/^Mem:/{print $2}')
22+ MAX_JOBS=$(( MEM_GB / 4 ))
23+ if [ $MAX_JOBS -gt %{compiling_processes} ] ; then MAX_JOBS=%{compiling_processes}; fi
24+ if [ $MAX_JOBS -lt 1 ]; then MAX_JOBS=1; fi
25+ export MAX_JOBS
2226export GCC_ROOT=${GCC_ROOT}
2327export LibLZMA_ROOT=${XZ_ROOT}
2428export USE_SYSTEM_PSIMD=ON
2529export PSIMD_SOURCE_DIR=${PSIMD_ROOT}
2630export BUILD_CUSTOM_PROTOBUF=OFF
2731export USE_SYSTEM_EIGEN_INSTALL=ON
28- export USE_SYSTEM_PSIMD=ON
2932export USE_SYSTEM_FXDIV=ON
3033export USE_SYSTEM_PYBIND11=ON
3134export PYBIND11_SYSPATH=${PY3_PYBIND11_ROOT}
@@ -50,9 +53,7 @@ export USE_NUMA=ON
5053export NUMA_ROOT_DIR=${NUMACTL_ROOT}
5154export USE_NUMPY=OFF
5255export USE_OPENMP=ON
53- export USE_QNNPACK=OFF
5456export USE_VALGRIND=OFF
55- export USE_XNNPACK=OFF
5657export USE_MKLDNN=OFF
5758export USE_DISTRIBUTED=OFF
5859export USE_MPI=ON
You can’t perform that action at this time.
0 commit comments