@@ -252,10 +252,15 @@ public static Tensor add_v2<Tx, Ty>(Tx x, Ty y, string name = null)
252252 // forward_compatible(2019, 6, 25):
253253 if ( tf . context . executing_eagerly ( ) )
254254 {
255- var _result = wrap_tfe_src . TFE_FastPathExecute ( tf . context , tf . context . device_name ,
256- "AddV2" , name , null ,
257- x , y ) ;
258- return _result ;
255+ using var status = new Status ( ) ;
256+ var tensor = c_api . TFE_FastPathExecute ( tf . context , tf . context . device_name ,
257+ "AddV2" , name , new IntPtr [ ]
258+ {
259+ x as EagerTensor ,
260+ y as EagerTensor
261+ } , 2 , null , status ) ;
262+ status . Check ( true ) ;
263+ return new EagerTensor ( tensor ) ;
259264 }
260265
261266 var _op = _op_def_lib . _apply_op_helper ( "AddV2" , name , args : new { x , y } ) ;
@@ -281,10 +286,14 @@ public static Tensor sin(Tensor x, string name = null)
281286 {
282287 if ( tf . context . executing_eagerly ( ) )
283288 {
284- var _result = wrap_tfe_src . TFE_FastPathExecute ( tf . context , tf . context . device_name ,
285- "Sin" , name , null ,
286- x ) ;
287- return _result ;
289+ using var status = new Status ( ) ;
290+ EagerTensorHandle tensor = c_api . TFE_FastPathExecute ( tf . context , tf . context . device_name ,
291+ "Sin" , name , new IntPtr [ ]
292+ {
293+ x as EagerTensor ,
294+ } , 1 , null , status ) ;
295+ status . Check ( true ) ;
296+ return tensor ;
288297 }
289298
290299 var _op = _op_def_lib . _apply_op_helper ( "Sin" , name , args : new { x } ) ;
@@ -310,10 +319,14 @@ public static Tensor sigmoid(Tensor x, string name = "Sigmoid")
310319 {
311320 if ( tf . context . executing_eagerly ( ) )
312321 {
313- var _result = wrap_tfe_src . TFE_FastPathExecute ( tf . context , tf . context . device_name ,
314- "Sigmoid" , name , null ,
315- x ) ;
316- return _result ;
322+ using var status = new Status ( ) ;
323+ EagerTensorHandle tensor = c_api . TFE_FastPathExecute ( tf . context , tf . context . device_name ,
324+ "Sigmoid" , name , new IntPtr [ ]
325+ {
326+ x as EagerTensor ,
327+ } , 1 , null , status ) ;
328+ status . Check ( true ) ;
329+ return tensor ;
317330 }
318331
319332 var op = _op_def_lib . _apply_op_helper ( "Sigmoid" , name : name , new { x } ) ;
@@ -398,10 +411,14 @@ public static Tensor tan(Tensor x, string name = null)
398411 {
399412 if ( tf . context . executing_eagerly ( ) )
400413 {
401- var _result = wrap_tfe_src . TFE_FastPathExecute ( tf . context , tf . context . device_name ,
402- "Tan" , name , null ,
403- x ) ;
404- return _result ;
414+ using var status = new Status ( ) ;
415+ EagerTensorHandle tensor = c_api . TFE_FastPathExecute ( tf . context , tf . context . device_name ,
416+ "Tan" , name , new IntPtr [ ]
417+ {
418+ x as EagerTensor ,
419+ } , 1 , null , status ) ;
420+ status . Check ( true ) ;
421+ return tensor ;
405422 }
406423
407424 var _op = _op_def_lib . _apply_op_helper ( "Tan" , name , args : new { x } ) ;
@@ -611,10 +628,14 @@ public static Tensor neg(Tensor x, string name = null)
611628 {
612629 if ( tf . context . executing_eagerly ( ) )
613630 {
614- var _result = wrap_tfe_src . TFE_FastPathExecute ( tf . context , tf . context . device_name ,
615- "Neg" , name , null ,
616- x ) ;
617- return _result ;
631+ using var status = new Status ( ) ;
632+ var tensor = c_api . TFE_FastPathExecute ( tf . context , tf . context . device_name ,
633+ "Neg" , name , new IntPtr [ ]
634+ {
635+ x as EagerTensor
636+ } , 2 , null , status ) ;
637+ status . Check ( true ) ;
638+ return new EagerTensor ( tensor ) ;
618639 }
619640
620641 var _op = _op_def_lib . _apply_op_helper ( "Neg" , name , args : new { x } ) ;
0 commit comments