From 7093db5ecda06b77f2debe181a07e5bfeed7fb13 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 31 Dec 2024 11:00:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8TCMalloc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用TCMalloc 使用TCMalloc 使用TCMalloc --- model_examples/StreamPETR/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/model_examples/StreamPETR/README.md b/model_examples/StreamPETR/README.md index 320daf94..668c4c42 100644 --- a/model_examples/StreamPETR/README.md +++ b/model_examples/StreamPETR/README.md @@ -155,6 +155,24 @@ cd {mxDriving_root_dir}/model_examples/StreamPETR cp -rf test StreamPETR ``` +7. 使用TCMalloc +``` +cd {mxDriving_root_dir}/model_examples/StreamPETR +wget https://github.com/gperftools/gperftools/releases/download/gperftools-2.16/gperftools-2.16.tar.gz +tar -zxvf gperftools-2.16.tar.gz +cd gperftools-2.16 +./configure --prefix=/usr/local/lib --with-tcmalloc-pagesize=64 +make +make install +echo '/usr/local/lib/lib/' >> /etc/ld.so.conf +ldconfig + +# 拉起训练前 +export LD_LIBRARY_PATH=/usr/local/lib/lib/:$LD_LIBRARY_PATH +export PATH=/usr/local/lib/bin:$PATH +export LD_PRELOAD=/usr/lib/libtcmalloc.so.4 +``` + ### 准备数据集 -- Gitee