Add regression test for memory leaks in string tensors#266
Add regression test for memory leaks in string tensors#266karllessard merged 1 commit intotensorflow:masterfrom
Conversation
karllessard
left a comment
There was a problem hiding this comment.
Thanks @saudet , would you mind explaining quickly what the test is measuring (e.g. where comes the 10_000_000 and why running GC if we are closing explicitly the tensors?)
It could be by adding some comments in the test?
|
It's just some arbitrary value that's probably enough to account for the overhead of the JVM and stuff that it does in the background. There isn't much to explain! I just came up with something that seems to work well enough for a unit test. If you feel that we shouldn't put tests that are not 100% in there, well, let's not merge this. This is the best I could come up with without spending the whole day on it. |
|
It looks like there's supposed to be a "CppMemoryChecker" that tracks allocations as per this file in the Python API: |
From #251