awslabs / awslabs/homomorphic-implementors-toolkit

Document SEAL memory management

Open
#122 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
72
Forks
10
PR merge metrics
No merged PRs in 30d

Description

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 (https://github.com/microsoft/SEAL/issues/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());` 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.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked SEAL issue and the existing application tests and benchmarks that use SEAL memory management. Compare the default global manager with seal::MMProfNew and document the relevant memory managers, their tradeoffs, and appropriate use in HIT; done means the notes clarify how SEAL memory should be managed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.