aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMark Peschel2023-08-19 12:45:38 -0400
committerMark Peschel2023-08-19 12:45:38 -0400
commit0be09bce7b2b6eb332209c25a1bd45d0468ac166 (patch)
treed61d68fe1d61d1198404936a7badcbf88f1c3481 /PKGBUILD
parentfb16167687a7255fd519c791012be6e7c7ba752f (diff)
downloadaur-0be09bce7b2b6eb332209c25a1bd45d0468ac166.tar.gz
Warn for /tmp size only if target.lst is big
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD35
1 files changed, 19 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1e7a067a8129..b0c0c33e16f3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -153,22 +153,25 @@ build() {
# Don't need --config=rocm for tensorflow-upstream, since it's included from .tf_configure.bazelrc
export BAZEL_ARGS="--config=opt"
- tmp_size=`df /tmp | sed -rn "s|tmpfs +([[:digit:]]+) +.*|\1|p"`
- if [ -z "$tmp_size" ]; then
- echo Please confirm your /tmp directory is larger than 8 gigabytes\;
- echo if it isn\'t, you may run into errors during the build due to running out of space
- echo \ if you are building for multiple architectures.
- echo Find /tmp size with "df -h".
- echo You can remount it larger with "mount -o remount,size=12G /tmp"
- echo \ if it is tmpfs and you have enough RAM.
- else
- if [ "$tmp_size" -lt 8388608 ]; then
- echo WARNING: Your /tmp directory is less than 8 gigibytes.
- echo You may run into errors during the build due to /tmp running out of space
- echo \ if you are building for multiple architectures.
- echo You can remount it larger with "mount -o remount,size=12G /tmp"
- echo \ if it is tmpfs and you have enough RAM.
- fi
+ if [[ -f /opt/rocm/bin/target.lst && `wc -l < /opt/rocm/bin/target.lst` > 3 ]]; then
+ # If building for multiple gfx architectures, confirm there's enough space in /tmp.
+ tmp_size=`df /tmp | sed -rn "s|tmpfs +([[:digit:]]+) +.*|\1|p"`
+ if [ -z "$tmp_size" ]; then
+ echo Please confirm your /tmp directory is larger than 8 gigabytes\;
+ echo if it isn\'t, you may run into errors during the build due to running out of space
+ echo \ if you are building for multiple architectures.
+ echo Find /tmp size with "df -h".
+ echo You can remount it larger with "mount -o remount,size=12G /tmp"
+ echo \ if it is tmpfs and you have enough RAM.
+ else
+ if [ "$tmp_size" -lt 8388608 ]; then
+ echo WARNING: Your /tmp directory is less than 8 gigibytes.
+ echo You may run into errors during the build due to /tmp running out of space
+ echo \ if you are building for multiple architectures.
+ echo You can remount it larger with "mount -o remount,size=12G /tmp"
+ echo \ if it is tmpfs and you have enough RAM.
+ fi
+ fi
fi
cd "${srcdir}"/tensorflow-upstream-rocm