diff options
author | 2018-01-05 12:38:20 -0800 | |
---|---|---|
committer | 2018-01-05 12:41:54 -0800 | |
commit | a17038297c82357634913603ce88994a3e3ea3bf (patch) | |
tree | f1983d7baf0479be244fc4bbce32e7f829b9fccf /tensorflow/c/eager/c_api.h | |
parent | 388c9b73318ad2ac4204ed67cebdcb7efcf19991 (diff) |
Clear eager kernel cache when resetting random seed.
"big hammer" required for reproducibility.
PiperOrigin-RevId: 180961787
Diffstat (limited to 'tensorflow/c/eager/c_api.h')
-rw-r--r-- | tensorflow/c/eager/c_api.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/c/eager/c_api.h b/tensorflow/c/eager/c_api.h index e30f59de4a..9b0fd037da 100644 --- a/tensorflow/c/eager/c_api.h +++ b/tensorflow/c/eager/c_api.h @@ -89,6 +89,10 @@ TF_CAPI_EXPORT extern void TFE_DeleteContext(TFE_Context* ctx, TF_Status* status TF_CAPI_EXPORT extern TF_DeviceList* TFE_ContextListDevices(TFE_Context* ctx, TF_Status* status); +// Clears the internal caches in the TFE context. Useful when reseeding random +// ops. +TF_CAPI_EXPORT extern void TFE_ContextClearCaches(TFE_Context* ctx); + // A handle to a tensor on a device. // // Like a TF_Tensor, a TFE_TensorHandle refers to a tensor with a value, shape, |