Drop every captured graph and the memory pool backing them.
(self)
| 65 | return len(self._graphs) |
| 66 | |
| 67 | def invalidate(self): |
| 68 | """Drop every captured graph and the memory pool backing them.""" |
| 69 | self._graphs.clear() |
| 70 | self._static_kwargs.clear() |
| 71 | self._static_outputs.clear() |
| 72 | self._pool = None |
| 73 | self._captured_length = None |
| 74 | |
| 75 | def begin_sequence(self, num_decode_steps): |
| 76 | """Decide once, before any decode step, whether this sequence uses graphs. |
no test coverage detected