Memory leaks at inference

Setting environment variable LD_PRELOAD with the aim of loading jemalloc instead of default CPU allocator solved the problem.

My launch is as follows:
LD_PRELOAD=./libjemalloc.so.1 python3 app.py.

Related links:

2 Likes