Skip to content

Commit 1ac674c

Browse files
authored
Merge pull request #13 from mammouth-ai/fix-baseline-install
implement #11
2 parents b4f2595 + cf6b6b1 commit 1ac674c

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

install.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,15 @@ detect_platform() {
4444
fi
4545
fi
4646

47-
PLATFORM="${BINARY_NAME}-${OS}-${ARCH}${LIBC}"
47+
# Check for AVX2 support on Linux x64; fall back to baseline binary if absent
48+
VARIANT=""
49+
if [ "$OS" = "linux" ] && [ "$ARCH" = "x64" ]; then
50+
if ! grep -q avx2 /proc/cpuinfo 2>/dev/null; then
51+
VARIANT="-baseline"
52+
fi
53+
fi
54+
55+
PLATFORM="${BINARY_NAME}-${OS}-${ARCH}${LIBC}${VARIANT}"
4856
}
4957

5058
# Get latest version from GitHub API

0 commit comments

Comments
 (0)