We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22638d6 commit f83abedCopy full SHA for f83abed
torch-build-env.file
@@ -18,7 +18,11 @@ fi
18
export USE_CUDNN=OFF
19
%endif
20
21
-export MAX_JOBS=%compiling_processes
+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
26
export GCC_ROOT=${GCC_ROOT}
27
export LibLZMA_ROOT=${XZ_ROOT}
28
export USE_SYSTEM_PSIMD=ON
0 commit comments