Document SEAL memory management
Opened this issue · 0 comments
Because HIT uses SEAL, it inherits SEAL's memory management. In tests and benchmarks, SEAL seems to be acquiring large quantities of memory, but never releasing it. I've investigated this with SEAL (microsoft/SEAL#241), but didn't make progress. I tried all of the suggested techniques for the application tests, but memory usage was actually worse compared to using the default global memory manager.
In the end, I was able to get SEAL to release memory by setting seal::MemoryManager::SwitchProfile(make_unique<seal::MMProfNew>());
before running unit tests, but according to SEAL, this memory manager "should only be used in special cases". It's not clear what these are, or what problems this memory manager might cause: it did not impact the runtime of the unit tests, and it dramatically reduced memory usage when I used it.
It would be good if we understood the SEAL memory managers and how to use them so that we could add some notes in HIT.