Skip to content

Commit

Permalink
Revert tcmalloc changes in testing (triton-inference-server#5135)
Browse files Browse the repository at this point in the history
* Remove setting LD_PRELOAD inside container. Only setting TCMALLOC_RELEASE_RATE

* Revert tcmalloc changes in testing
  • Loading branch information
krishung5 authored Dec 5, 2022
1 parent 4cd11dd commit 55bddd4
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 43 deletions.
3 changes: 1 addition & 2 deletions Dockerfile.sdk
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,5 @@ ENV LD_LIBRARY_PATH /workspace/install/lib:${LD_LIBRARY_PATH}
# DLIS-3631: Needed to run Perf Analyzer CI tests correctly
ENV LD_LIBRARY_PATH /opt/hpcx/ompi/lib:${LD_LIBRARY_PATH}

# Set LD_PRELOAD with tcmalloc and TCMALLOC_RELEASE_RATE
ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4:${LD_PRELOAD}
# Set TCMALLOC_RELEASE_RATE for users setting LD_PRELOAD with tcmalloc
ENV TCMALLOC_RELEASE_RATE 200
3 changes: 1 addition & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1075,8 +1075,7 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu,
{backend_dependencies} && \
rm -rf /var/lib/apt/lists/*
# Set LD_PRELOAD with tcmalloc and TCMALLOC_RELEASE_RATE
ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4:${{LD_PRELOAD}}
# Set TCMALLOC_RELEASE_RATE for users setting LD_PRELOAD with tcmalloc
ENV TCMALLOC_RELEASE_RATE 200
'''.format(gpu_enabled=gpu_enabled, backend_dependencies=backend_dependencies)

Expand Down
6 changes: 1 addition & 5 deletions qa/L0_batcher/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ fi
# Add valgrind flag check
if [ "$TEST_VALGRIND" -eq 1 ]; then
LEAKCHECK=/usr/bin/valgrind
LEAKCHECK_ARGS_BASE="--leak-check=full --show-leak-kinds=definite --max-threads=3000 --soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# Since the flag "--soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# is already set for tcmalloc replacement for Valgrind test, need to remove
# tcmalloc library from LD_PRELOAD.
unset LD_PRELOAD
LEAKCHECK_ARGS_BASE="--leak-check=full --show-leak-kinds=definite --max-threads=3000"
SERVER_TIMEOUT=3600
rm -f *.valgrind.log

Expand Down
4 changes: 1 addition & 3 deletions qa/L0_client_build_variants/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
# Install required dependencies for client build
apt-get update && \
apt-get install -y --no-install-recommends \
rapidjson-dev \
gperf \
libgoogle-perftools-dev
rapidjson-dev

# Client build requires recent version of CMake (FetchContent required)
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
Expand Down
6 changes: 1 addition & 5 deletions qa/L0_client_memory_growth/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ fi
export CUDA_VISIBLE_DEVICES=0

LEAKCHECK=/usr/bin/valgrind
LEAKCHECK_ARGS_BASE="--max-threads=3000 --tool=massif --time-unit=B --soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# Since the flag "--soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# is already set for tcmalloc replacement for Valgrind test, need to remove
# tcmalloc library from LD_PRELOAD.
unset LD_PRELOAD
LEAKCHECK_ARGS_BASE="--max-threads=3000 --tool=massif --time-unit=B"
SERVER_TIMEOUT=3600
rm -f *.log *.massif

Expand Down
8 changes: 2 additions & 6 deletions qa/L0_client_valgrind/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -43,11 +43,7 @@ fi
export CUDA_VISIBLE_DEVICES=0

LEAKCHECK=/usr/bin/valgrind
LEAKCHECK_ARGS_BASE="--leak-check=full --show-leak-kinds=definite --max-threads=3000 --soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# Since the flag "--soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# is already set for tcmalloc replacement for Valgrind test, need to remove
# tcmalloc library from LD_PRELOAD.
unset LD_PRELOAD
LEAKCHECK_ARGS_BASE="--leak-check=full --show-leak-kinds=definite --max-threads=3000"
SERVER_TIMEOUT=3600
rm -f *.log

Expand Down
6 changes: 1 addition & 5 deletions qa/L0_infer/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ fi
if [ "$TEST_VALGRIND" -eq 1 ]; then
LEAKCHECK_LOG_BASE="./valgrind_test"
LEAKCHECK=/usr/bin/valgrind
LEAKCHECK_ARGS_BASE="--leak-check=full --show-leak-kinds=definite --max-threads=3000 --num-callers=20 --soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# Since the flag "--soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# is already set for tcmalloc replacement for Valgrind test, need to remove
# tcmalloc library from LD_PRELOAD.
unset LD_PRELOAD
LEAKCHECK_ARGS_BASE="--leak-check=full --show-leak-kinds=definite --max-threads=3000 --num-callers=20"
SERVER_TIMEOUT=4000
rm -f $LEAKCHECK_LOG_BASE*
# Remove onnx and python backends for now as the server hangs up when
Expand Down
6 changes: 1 addition & 5 deletions qa/L0_memory_growth/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ SERVER_TIMEOUT=1200

# Valgrind massif
LEAKCHECK=/usr/bin/valgrind
LEAKCHECK_ARGS_BASE="--tool=massif --time-unit=B --soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# Since the flag "--soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# is already set for tcmalloc replacement for Valgrind test, need to remove
# tcmalloc library from LD_PRELOAD.
unset LD_PRELOAD
LEAKCHECK_ARGS_BASE="--tool=massif --time-unit=B"
MASSIF_TEST=../common/check_massif_log.py

source ../common/util.sh
Expand Down
4 changes: 1 addition & 3 deletions qa/L0_perf_tfs/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -42,8 +42,6 @@ apt update
apt install -y libb64-dev
# needed by reporter
apt install -y python3 python3-pip python3-dev
# needed by tcmalloc
apt install -y gperf libgoogle-perftools-dev
rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
pip3 install --upgrade requests

Expand Down
4 changes: 1 addition & 3 deletions qa/L0_perf_ts/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -41,8 +41,6 @@ fi
apt update
apt install -y libb64-dev curl
apt install -y python3 python3-pip python3-dev
# needed by tcmalloc
apt install -y gperf libgoogle-perftools-dev
pip3 install --upgrade requests

REPODIR=/data/inferenceserver/${REPO_VERSION}
Expand Down
5 changes: 1 addition & 4 deletions qa/L0_sequence_batcher/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ fi

if [ "$TEST_VALGRIND" -eq 1 ]; then
LEAKCHECK=/usr/bin/valgrind
LEAKCHECK_ARGS_BASE="--leak-check=full --show-leak-kinds=definite --max-threads=3000 --soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# Since the flag "--soname-synonyms=somalloc=/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4"
# is already set for tcmalloc replacement for Valgrind test, need to unset LD_PRELOAD.
unset LD_PRELOAD
LEAKCHECK_ARGS_BASE="--leak-check=full --show-leak-kinds=definite --max-threads=3000"
SERVER_TIMEOUT=3600
rm -f *.valgrind.log

Expand Down

0 comments on commit 55bddd4

Please sign in to comment.