Open KOLANICH opened 4 years ago
@KOLANICH, are you using pre-built LLVM? Which build type are you using?
I wouldn't expect the translator library to consume 8 GiB of memory during compilation, but this might be true for LLVM.
Just tried on my machine: I have CMAKE_BUILD_TYPE=Debug
and pre-built versions of LLVM & Clang. I've launched make llvm-spirv -j1
and watched to htop
output - the biggest value of memory consumption I saw is around 2GiB (and it seems that ~700 MiB are allocated for some other processes launched on my machine)
are you using pre-built LLVM? Which build type are you using?
Yes, llvm-10 from the official deb repo. Release
build type.
FYI @bwlodarcz
The flags were
ninja -j 1 -k 0
, so it is a single thread consumption and if an attempt had failed, the build system starts building the nextcpp
file.The compiler is
g++-9
, the build type isRelease
.The plot is made by using
psrecord
and then importing the file into python usingnp.genfromtxt
and plotting usingmatplotlib.pyplot
.When compiling this lib compilation often fails even on PCs with 8 GiB of RAM (a guaranteed way to fail it is to just run Firefox in background). Overcommit is disabled to mitigate complete system hangs because of 12309.
Also if always fails without
-j 1
when building from scratch (one has to run ninja multiple times to get it built).So I feel like that memory consumption should be reduced somehow.