Give up on graphs for good and run eagerly. Only safe before any replay has happened in the current sequence, which is why this is reachable only from the capture path.
(self, reason, args, kwargs)
| 136 | return all(captured[name].shape == kwargs[name].shape for name in captured) |
| 137 | |
| 138 | def _fall_back(self, reason, args, kwargs): |
| 139 | """Give up on graphs for good and run eagerly. |
| 140 | |
| 141 | Only safe before any replay has happened in the current sequence, which |
| 142 | is why this is reachable only from the capture path. |
| 143 | """ |
| 144 | logger.warning(f"HybridEngine graph capture disabled: {reason}") |
| 145 | self.invalidate() |
| 146 | self._disabled = True |
| 147 | self._use_graphs = False |
| 148 | return self._forward(*args, **kwargs) |
| 149 | |
| 150 | def __call__(self, *args, **kwargs): |
| 151 | input_ids = kwargs.get("input_ids") |
no test coverage detected