Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions packages/adsim/build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ install_packages() {
# Note: fast_float and boost are built from source since system packages are too old
# On CentOS Stream 10+, gcc-toolset-14 doesn't exist (GCC 14 is default);
# use libatomic-devel directly. On older systems, try gcc-toolset-14-libatomic-devel.
sudo dnf install -y clang jemalloc-devel xxhash-devel bzip2-devel libomp-devel gengetopt python3-devel gtest-devel \
sudo dnf install -y cmake bison flex openssl-devel numactl-devel clang jemalloc-devel xxhash-devel bzip2-devel libomp-devel gengetopt python3-devel gtest-devel \
double-conversion double-conversion-devel libsodium-devel \
gflags-devel glog-devel libunwind-devel libevent-devel lz4-devel libzstd-devel snappy-devel xz-devel binutils-devel
# Install libatomic — try gcc-toolset first (RHEL 9), fall back to base package (CentOS Stream 10+)
Expand All @@ -24,7 +24,7 @@ install_packages() {
# Ubuntu/Debian systems - map package names to Ubuntu equivalents
# Note: fast_float and boost are built from source since system packages are too old
sudo apt-get update
sudo apt-get install -y clang libjemalloc-dev libxxhash-dev libbz2-dev libomp-dev gengetopt libatomic1 python3-dev libgtest-dev \
sudo apt-get install -y cmake bison flex libssl-dev libnuma-dev clang libjemalloc-dev libxxhash-dev libbz2-dev libomp-dev gengetopt libatomic1 python3-dev libgtest-dev \
libdouble-conversion-dev libsodium-dev \
libgflags-dev libgoogle-glog-dev libunwind-dev libevent-dev liblz4-dev libzstd-dev libsnappy-dev liblzma-dev libiberty-dev
else
Expand Down Expand Up @@ -54,12 +54,12 @@ export CXX="${ADSIM_CXX_COMPILER}"
# Pin Facebook library versions for reproducible builds
# Note: Facebook OSS libraries (folly, fizz, wangle, mvfst, fbthrift, fb303) are released
# together with matching version tags to ensure compatibility
FOLLY_VERSION=v2025.06.23.00
FIZZ_VERSION=v2025.06.23.00
WANGLE_VERSION=v2025.06.23.00
MVFST_VERSION=v2025.06.23.00
FBTHRIFT_VERSION=v2025.06.23.00
FB303_VERSION=v2025.06.23.00
FOLLY_VERSION=v2026.08.03.00
FIZZ_VERSION=v2026.08.03.00
WANGLE_VERSION=v2026.08.03.00
MVFST_VERSION=v2026.08.03.00
FBTHRIFT_VERSION=v2026.08.03.00
FB303_VERSION=v2026.08.03.00

# fast_float v8.0.0+ is required for folly's allow_leading_plus feature
FAST_FLOAT_VERSION=v8.0.0
Expand Down
11 changes: 9 additions & 2 deletions packages/adsim/install_adsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ setup_directories() {
# Create final benchmark output directory
mkdir -p ${BENCHMARKS_DIR}

# Clean and recreate temporary build directory
rm -rf ${BUILD_DIR}
# Clean and recreate temporary build directory.
# SKIP_CLEAN=1 preserves an existing build dir so that deps/ and staging/ can
# be reused across iterations; otherwise every install rebuilds the whole
# dependency stack from scratch.
if [ "${SKIP_CLEAN}" = "1" ]; then
echo "[SETUP] SKIP_CLEAN=1 - preserving existing ${BUILD_DIR}"
else
rm -rf ${BUILD_DIR}
fi
mkdir -p ${BUILD_DIR}

# Enter build directory for subsequent operations
Expand Down
18 changes: 9 additions & 9 deletions packages/adsim/install_fbgemm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
MINICONDA_PREFIX=${FBGEMM_STAGING_DIR}/miniconda

# Version of FBGEMM to install
FBGEMM_VERSION=v1.4.0
FBGEMM_VERSION=v1.8.0

# Version of PyTorch to install
PYTORCH_VERSION=2.8.0
PYTORCH_VERSION=2.13.0

MINICONDA_VERSION="5.1-0"

Expand Down Expand Up @@ -809,7 +809,7 @@ setup_directories() {
# Change the current directory to the build directory
# pushd saves the current directory on a stack so we can return to it later with popd
echo "[SETUP] Changing to build directory..."
pushd ${FBGEMM_STAGING_DIR} || exist
pushd ${FBGEMM_STAGING_DIR} || exit 1

echo "[SETUP] Directory setup complete."
}
Expand Down Expand Up @@ -906,7 +906,7 @@ clone_fbgemm_repo() {
echo "#!/bin/bash" > fbgemm/.github/scripts/fbgemm_gpu_postbuild.bash

# Change the current directory to the FBGEMM GPU directory
pushd fbgemm/fbgemm_gpu || exist
pushd fbgemm/fbgemm_gpu || exit 1

echo "[SETUP] FBGEMM repository setup complete."
}
Expand Down Expand Up @@ -962,13 +962,13 @@ install_fbgemm() {
echo "[BUILD] Building and installing FBGEMM..."
# shellcheck disable=SC2086
# print_exec conda run -n $BUILD_ENV python setup.py ${run_multicore} install --package_variant=cpu
popd || exist
pushd fbgemm || exist
popd || exit 1
pushd fbgemm || exit 1
mkdir build
cp ${ADSIM_PROJ_ROOT}/buildfiles/fbgemm/cmake.txt build
pushd build || exist
pushd build || exit 1
source cmake.txt
popd || exist
popd || exit 1

# Test if the FBGEMM library can be imported in the Conda environment
# Generate a standalone executable for the project
Expand Down Expand Up @@ -1006,7 +1006,7 @@ cleanup() {

# This restores the directory we were in before entering the build directory
echo "[CLEANUP] Returning to original directory..."
popd || exist
popd || exit 1

# Remove the build directory to clean up after the build process
# This saves disk space by removing intermediate build files
Expand Down
4 changes: 2 additions & 2 deletions packages/adsim/src/cpp2/server/dwarfs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ add_dependencies(gemm fbgemm)
add_library(embedding Embedding.cc Embedding.h)

if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
target_compile_options(gemm PRIVATE
target_compile_options(embedding PRIVATE
${COROUTINES_FLAG}
-m64
-mavx2
-mfma
-masm=intel)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64")
target_compile_options(gemm PRIVATE
target_compile_options(embedding PRIVATE
${COROUTINES_FLAG}
-march=armv8.5-a+sve2
-mcpu=native)
Expand Down