OpenMathLib / OpenMathLib/OpenBLAS
2 GB at the start
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 7.6k
- Forks
- 1.7k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 42
Description
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?
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: https://github.com/ggml-org/llama.cpp/issues/18024
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the startup behavior under MSYS2 by entering main() in a program linked to OpenBLAS and inspecting allocations with VMMap. Compare the default thread settings with OPENBLAS_NUM_THREADS, GOTO_NUM_THREADS, OMP_NUM_THREADS, and openblas_set_num_threads(1). Done means determining whether the 128 MB-per-thread DLLMain allocations are necessary or can be deferred.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100