@@ -24,11 +24,9 @@ protected ParamLessModule(IntPtr handle, IntPtr boxedHandle) : base(handle, boxe
24
24
25
25
// Rather than spending cycles only to discover that this module has neither
26
26
// parameters nor buffers, just shortcut the move completely.
27
- protected internal override nn . Module _to ( Device device , ScalarType dtype ) => this ;
28
-
29
- protected internal override nn . Module _to ( DeviceType deviceType , int deviceIndex = - 1 ) => this ;
30
-
31
- protected internal override nn . Module _to ( ScalarType dtype ) => this ;
27
+ protected internal override nn . Module _to ( Device device , ScalarType dtype , bool non_blocking ) => this ;
28
+ protected internal override nn . Module _to ( DeviceType deviceType , int deviceIndex , bool non_blocking ) => this ;
29
+ protected internal override nn . Module _to ( ScalarType dtype , bool non_blocking ) => this ;
32
30
33
31
public override void register_buffer ( string name , Tensor tensor , bool persistent = true )
34
32
{
@@ -60,11 +58,10 @@ protected ParamLessModule(IntPtr handle, IntPtr boxedHandle) : base(handle, boxe
60
58
61
59
// Rather than spending cycles only to discover that this module has neither
62
60
// parameters nor buffers, just shortcut the move completely.
63
- protected internal override nn . Module _to ( Device device , ScalarType dtype ) => this ;
64
-
65
- protected internal override nn . Module _to ( DeviceType deviceType , int deviceIndex = - 1 ) => this ;
61
+ protected internal override nn . Module _to ( Device device , ScalarType dtype , bool non_blocking ) => this ;
62
+ protected internal override nn . Module _to ( DeviceType deviceType , int deviceIndex , bool non_blocking ) => this ;
63
+ protected internal override nn . Module _to ( ScalarType dtype , bool non_blocking ) => this ;
66
64
67
- protected internal override nn . Module _to ( ScalarType dtype ) => this ;
68
65
69
66
public override void register_buffer ( string name , Tensor tensor , bool persistent = true )
70
67
{
@@ -94,13 +91,11 @@ protected ParamLessModule(string name) : base(name) { }
94
91
95
92
protected ParamLessModule ( IntPtr handle , IntPtr boxedHandle ) : base ( handle , boxedHandle ) { }
96
93
97
- // Rather than spending cycles only to discover that this module has neither
94
+ // Rather than spending cycles only to discover that this module has neither
98
95
// parameters nor buffers, just shortcut the move completely.
99
- protected internal override nn . Module _to ( Device device , ScalarType dtype ) => this ;
100
-
101
- protected internal override nn . Module _to ( DeviceType deviceType , int deviceIndex = - 1 ) => this ;
102
-
103
- protected internal override nn . Module _to ( ScalarType dtype ) => this ;
96
+ protected internal override nn . Module _to ( Device device , ScalarType dtype , bool non_blocking ) => this ;
97
+ protected internal override nn . Module _to ( DeviceType deviceType , int deviceIndex , bool non_blocking ) => this ;
98
+ protected internal override nn . Module _to ( ScalarType dtype , bool non_blocking ) => this ;
104
99
105
100
public override void register_buffer ( string name , Tensor tensor , bool persistent = true )
106
101
{
0 commit comments