Skip to content

2 GB at the start #5587

@tim-lebedkov

Description

@tim-lebedkov

Just entering the main() in a program linking to "openblas" under MSYS2 consumes 2 GB of RAM.
VMMap shows it as 16 blocks 128 MB each. Are these allocations necessary? Can they be postponed to when I really need something from OpenBLAS?

Image

Setting these variables reduces the memory to 600 MB. It looks like 128 MB is allocated per thread in DLLMain

set OPENBLAS_NUM_THREADS=4
set GOTO_NUM_THREADS=4
set OMP_NUM_THREADS=4

This does not help either:
openblas_set_num_threads(1);

The original issue was against libllama: ggml-org/llama.cpp#18024

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions