[CPU] Enable tcmalloc for s390x (#50841)
Signed-off-by: Rehan Khan <Rehan.Khan7@ibm.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>
This commit is contained in:
co-authored by
Li, Jiang <jiang1.li@intel.com>
parent
2cb3ff88cc
commit
0187f4c88e
@@ -117,6 +117,27 @@ VLLM_TARGET_DEVICE=cpu VLLM_CPU_MOE_PREPACK=0 python setup.py bdist_wheel && \
|
||||
pip install dist/*.whl
|
||||
```
|
||||
|
||||
!!! warning "set `LD_PRELOAD` for TCMalloc"
|
||||
For best memory allocation performance, build and install
|
||||
[gperftools](https://github.com/gperftools/gperftools) (TCMalloc) from
|
||||
source and add it to `LD_PRELOAD`:
|
||||
|
||||
```bash
|
||||
# Build and install TCMalloc from source
|
||||
curl -LO https://github.com/gperftools/gperftools/releases/download/gperftools-2.16/gperftools-2.16.tar.gz
|
||||
tar -xzf gperftools-2.16.tar.gz
|
||||
cd gperftools-2.16
|
||||
./configure --enable-minimal && make -j$(nproc) && sudo make install
|
||||
sudo ldconfig
|
||||
cd ..
|
||||
|
||||
# Add to LD_PRELOAD
|
||||
export LD_PRELOAD="/usr/local/lib/libtcmalloc_minimal.so.4:$LD_PRELOAD"
|
||||
```
|
||||
|
||||
The Docker image (`Dockerfile.s390x`) already includes TCMalloc and sets
|
||||
`LD_PRELOAD` automatically.
|
||||
|
||||
!!! warning "Protobuf workaround for s390x"
|
||||
The C++ protobuf extension crashes on s390x. After installation, set the
|
||||
following environment variable and remove the C++ extensions:
|
||||
|
||||
Reference in New Issue
Block a user