On session completion, the executor may call Device::Sync() depending on flag settings. Override this to return false for devices that don't allow such calls. Instead, these devices must use other mechanisms (such as num_deferred_ops) to ensure the device has finished processing necessary work at session completion. In addition, for these devices, RefreshStatus must be called at session completion
| 125 | // |
| 126 | // Devices that override this function must also implement RefreshStatus. |
| 127 | virtual bool AllowsSyncOnCompletion() const { return true; } |
| 128 | |
| 129 | // This is used in conjunction with AllowsSyncOnCompletion to allow the |
| 130 | // executor to get execution result status at session completion. |