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
46 changes: 46 additions & 0 deletions benchpress/config/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,51 @@
options:
is_move: true
after:
- '/tmp/feedsim_log.txt'
- 'benchmarks/feedsim/feedsim_results.txt'
- 'benchmarks/feedsim/src/perf.data'

- name: feedsim_dlrm
benchmark: feedsim
description: >
Aggregator like workload with DLRM (Deep Learning Recommendation Model)
inference. Uses async I/O for improved throughput on high-core CPUs.
Finds maximum QPS that system can sustain while keeping
95th percentile latency <= 500 msecs.
args:
- '-p {port}'
- '-o {output}'
- '--async-io'
- '--io-dist={io_dist}'
- '--io-mean={io_mean}'
- '--workload={workload}'
- '--dlrm-model={dlrm_model}'
- '--dlrm-batch-size={dlrm_batch_size}'
- '--dlrm-threads={dlrm_threads}'
vars:
- 'port=11222'
- 'output=feedsim_results.txt'
- 'io_dist=fixed'
- 'io_mean=200'
- 'workload=dlrm'
- 'dlrm_model=models/dlrm_small.pt'
- 'dlrm_batch_size=256'
- 'dlrm_threads=8'
hooks:
- hook: cpu-mpstat
options:
args:
- '-u' # utilization
- '1' # second interval
- hook: copymove
options:
is_move: true
after:
- '/tmp/feedsim_log.txt'
- 'benchmarks/feedsim/feedsim_results.txt'
- 'benchmarks/feedsim/src/perf.data'
- '/tmp/feedsim_log.txt'

- name: feedsim_autoscale
benchmark: feedsim_autoscale
description: >
Expand Down Expand Up @@ -594,6 +636,7 @@
- 'benchmarks/feedsim/feedsim_results*.txt'
- 'benchmarks/feedsim/feedsim-multi-inst-*.log'
- 'benchmarks/feedsim/src/perf.data'
- '/tmp/feedsim_log.txt'

- name: feedsim_autoscale_mini
benchmark: feedsim_autoscale
Expand Down Expand Up @@ -639,6 +682,7 @@
- 'benchmarks/feedsim/feedsim-multi-inst-*.log'
- 'benchmarks/feedsim/src/perf.data'
- 'benchmarks/feedsim/breakdown.csv'
- '/tmp/feedsim_log.txt'

- name: feedsim_autoscale_arm
benchmark: feedsim_autoscale
Expand Down Expand Up @@ -669,6 +713,7 @@
- 'benchmarks/feedsim/feedsim_results*.txt'
- 'benchmarks/feedsim/feedsim-multi-inst-*.log'
- 'benchmarks/feedsim/src/perf.data'
- '/tmp/feedsim_log.txt'

- name: feedsim_autoscale_arm_mini
benchmark: feedsim_autoscale
Expand Down Expand Up @@ -711,6 +756,7 @@
- 'benchmarks/feedsim/feedsim-multi-inst-*.log'
- 'benchmarks/feedsim/src/perf.data'
- 'benchmarks/feedsim/breakdown.csv'
- '/tmp/feedsim_log.txt'


- benchmark: spark_standalone
Expand Down
189 changes: 0 additions & 189 deletions packages/feedsim/alternative_install_feedsim_aws.sh

This file was deleted.

69 changes: 64 additions & 5 deletions packages/feedsim/install_feedsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ FEEDSIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
BENCHPRESS_ROOT="$(readlink -f "$FEEDSIM_ROOT/../..")"
FEEDSIM_ROOT_SRC="${BENCHPRESS_ROOT}/benchmarks/feedsim"
FEEDSIM_THIRD_PARTY_SRC="${FEEDSIM_ROOT_SRC}/third_party"
LIBTORCH_VERSION="2.1.0"
DLRM_MODEL_URL="https://github.com/facebookresearch/DCPerf-datasets/releases/download/feedsim-dlrm/dlrm_small.tar.gz"
echo "BENCHPRESS_ROOT is ${BENCHPRESS_ROOT}"

source "${BENCHPRESS_ROOT}/packages/common/os-distro.sh"
Expand All @@ -34,7 +36,7 @@ die() {
ARCH="$(uname -p)"
if [ "$ARCH" = "aarch64" ]; then
if distro_is_like ubuntu; then
"${FEEDSIM_ROOT}"/install_feedsim_ubuntu.sh
"${FEEDSIM_ROOT}"/install_feedsim_aarch64_ubuntu.sh
exit $?
else
"${FEEDSIM_ROOT}"/install_feedsim_aarch64.sh
Expand All @@ -48,7 +50,8 @@ fi
dnf install -y bc ninja-build flex bison git texinfo binutils-devel \
libsodium-devel libunwind-devel bzip2-devel double-conversion-devel \
libzstd-devel lz4-devel xz-devel snappy-devel libtool bzip2 openssl-devel \
zlib-devel libdwarf libdwarf-devel libaio-devel libatomic patch jq xxhash xxhash-devel
zlib-devel libdwarf libdwarf-devel libaio-devel libatomic patch jq \
xxhash xxhash-devel unzip

# Creates feedsim directory under benchmarks/
mkdir -p "${BENCHPRESS_ROOT}/benchmarks/feedsim"
Expand Down Expand Up @@ -176,6 +179,48 @@ fi

msg "Installing third-party dependencies ... DONE"

# Installing LibTorch for DLRM support
msg "Installing LibTorch for DLRM support..."
cd "${FEEDSIM_THIRD_PARTY_SRC}"

ARCH="$(uname -m)"
if [ "$ARCH" = "x86_64" ]; then
LIBTORCH_URL="https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}%2Bcpu.zip"
elif [ "$ARCH" = "aarch64" ]; then
msg "WARNING: Pre-built LibTorch for ARM64 may not be available."
msg "Attempting to download CPU version..."
LIBTORCH_URL="https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}%2Bcpu.zip"
else
die "Unsupported architecture: ${ARCH}"
fi

if ! [ -d "libtorch" ]; then
msg "Downloading LibTorch ${LIBTORCH_VERSION}..."
wget "${LIBTORCH_URL}" -O libtorch.zip
msg "Extracting LibTorch..."
unzip -q libtorch.zip
rm libtorch.zip
msg "LibTorch installed to ${FEEDSIM_THIRD_PARTY_SRC}/libtorch"
else
msg "[SKIPPED] LibTorch already installed"
fi

# Download DLRM model
msg "Downloading DLRM model..."
DLRM_MODEL_DIR="${FEEDSIM_ROOT_SRC}/models"
mkdir -p "${DLRM_MODEL_DIR}"

if ! [ -f "${DLRM_MODEL_DIR}/dlrm_small.pt" ]; then
msg "Downloading DLRM model from ${DLRM_MODEL_URL}..."
wget "${DLRM_MODEL_URL}" -O "${DLRM_MODEL_DIR}/dlrm_small.tar.gz"
msg "Extracting DLRM model..."
tar -xzf "${DLRM_MODEL_DIR}/dlrm_small.tar.gz" -C "${DLRM_MODEL_DIR}"
rm "${DLRM_MODEL_DIR}/dlrm_small.tar.gz"
msg "DLRM model installed to ${DLRM_MODEL_DIR}"
else
msg "[SKIPPED] DLRM model already installed"
fi


# Installing FeedSim
cd "${FEEDSIM_ROOT_SRC}"
Expand Down Expand Up @@ -203,18 +248,32 @@ fi

mkdir -p build && cd build/

# Build FeedSim
# Build FeedSim with DLRM support
FS_CFLAGS="${BP_CFLAGS:--O3 -DNDEBUG}"
FS_CXXFLAGS="${BP_CXXFLAGS:--O3 -DNDEBUG }"
FS_LDFLAGS="${BP_LDFLAGS:-} -latomic -Wl,--export-dynamic"

cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER="$BP_CC" \
-DCMAKE_CXX_COMPILER="$BP_CXX" \
-DCMAKE_C_COMPILER="${BP_CC:-gcc}" \
-DCMAKE_CXX_COMPILER="${BP_CXX:-g++}" \
-DCMAKE_C_FLAGS_RELEASE="$FS_CFLAGS" \
-DCMAKE_CXX_FLAGS_RELEASE="$FS_CXXFLAGS -DFMT_HEADER_ONLY=1" \
-DCMAKE_EXE_LINKER_FLAGS_RELEASE="$FS_LDFLAGS" \
-DFEEDSIM_USE_DLRM=ON \
-DTorch_DIR="${FEEDSIM_THIRD_PARTY_SRC}/libtorch/share/cmake/Torch" \
-DCMAKE_PREFIX_PATH="${FEEDSIM_THIRD_PARTY_SRC}/libtorch" \
../

ninja -v -j1

msg ""
msg "=== FeedSim Installation Complete ==="
msg ""
msg "To run FeedSim with DLRM workload:"
msg " cd ${FEEDSIM_ROOT_SRC}"
msg " ./run.sh --workload=dlrm --dlrm-model=${DLRM_MODEL_DIR}/dlrm_small.pt"
msg ""
msg "Or use the standard PageRank workload:"
msg " ./run.sh"
msg ""
Loading
Loading