@@ -102,14 +102,20 @@ public partial class c_api
102102 public static extern TFE_Op TFE_NewOp ( IntPtr ctx , string op_or_function_name , IntPtr status ) ;
103103
104104 /// <summary>
105- ///
105+ /// Resets `op_to_reset` with `op_or_function_name` and `raw_device_name`. This
106+ /// is for performance optimization by reusing an exiting unused op rather than
107+ /// creating a new op every time. If `raw_device_name` is `NULL` or empty, it
108+ /// does not set the device name. If it's not `NULL`, then it attempts to parse
109+ /// and set the device name. It's effectively `TFE_OpSetDevice`, but it is faster
110+ /// than separately calling it because if the existing op has the same
111+ /// `raw_device_name`, it skips parsing and just leave as it is.
106112 /// </summary>
107- /// <param name="ctx">TFE_Context *</param>
113+ /// <param name="op_to_reset">TFE_Op *</param>
108114 /// <param name="op_or_function_name">const char*</param>
115+ /// <param name="raw_device_name">const char*</param>
109116 /// <param name="status">TF_Status*</param>
110- /// <param name="op_to_reset">TFE_Op*</param>
111117 [ DllImport ( TensorFlowLibName ) ]
112- public static extern void TFE_OpReset ( IntPtr ctx , string op_or_function_name , IntPtr status , IntPtr op_to_reset ) ;
118+ public static extern void TFE_OpReset ( IntPtr op_to_reset , string op_or_function_name , string raw_device_name , IntPtr status ) ;
113119
114120 /// <summary>
115121 ///
@@ -304,5 +310,17 @@ public partial class c_api
304310 /// <returns>TFE_Executor*</returns>
305311 [ DllImport ( TensorFlowLibName ) ]
306312 public static extern TFE_Executor TFE_ContextGetExecutorForThread ( IntPtr ctx ) ;
313+
314+ [ DllImport ( TensorFlowLibName ) ]
315+ public static extern void TFE_Test ( ) ;
316+
317+ [ DllImport ( TensorFlowLibName ) ]
318+ public static extern IntPtr TFE_TapeSetNew ( bool persistent , bool watch_accessed_variables ) ;
319+
320+ [ DllImport ( TensorFlowLibName ) ]
321+ public static extern void TFE_TapeWatch ( IntPtr tape , IntPtr tensor , int tensor_id ) ;
322+
323+ [ DllImport ( TensorFlowLibName ) ]
324+ public static extern void TFE_TapeGradient ( IntPtr tape , long [ ] targetTensorIds , IntPtr [ ] target , long [ ] sourcesTensorIds , IntPtr status ) ;
307325 }
308326}
0 commit comments