@@ -30,7 +30,7 @@ void Copy<platform::CPUPlace, platform::CPUPlace>(platform::CPUPlace, void* dst,
30
30
template <>
31
31
void Copy<platform::CPUPlace, platform::CUDAPlace>(
32
32
platform::CPUPlace dst_place, void * dst, platform::CUDAPlace src_place,
33
- const void * src, size_t num, cudaStream_t stream = nullptr ) {
33
+ const void * src, size_t num, cudaStream_t stream) {
34
34
platform::SetDeviceId (src_place.device );
35
35
if (stream) {
36
36
platform::GpuMemcpyAsync (dst, src, num, cudaMemcpyDeviceToHost, stream);
@@ -42,7 +42,7 @@ void Copy<platform::CPUPlace, platform::CUDAPlace>(
42
42
template <>
43
43
void Copy<platform::CUDAPlace, platform::CPUPlace>(
44
44
platform::CUDAPlace dst_place, void * dst, platform::CPUPlace src_place,
45
- const void * src, size_t num, cudaStream_t stream = nullptr ) {
45
+ const void * src, size_t num, cudaStream_t stream) {
46
46
platform::SetDeviceId (dst_place.device );
47
47
if (stream) {
48
48
platform::GpuMemcpyAsync (dst, src, num, cudaMemcpyHostToDevice, stream);
@@ -54,7 +54,7 @@ void Copy<platform::CUDAPlace, platform::CPUPlace>(
54
54
template <>
55
55
void Copy<platform::CUDAPlace, platform::CUDAPlace>(
56
56
platform::CUDAPlace dst_place, void * dst, platform::CUDAPlace src_place,
57
- const void * src, size_t num, cudaStream_t stream = nullptr ) {
57
+ const void * src, size_t num, cudaStream_t stream) {
58
58
if (dst_place == src_place) {
59
59
platform::SetDeviceId (src_place.device );
60
60
if (stream) {
@@ -68,7 +68,7 @@ void Copy<platform::CUDAPlace, platform::CUDAPlace>(
68
68
num, stream);
69
69
} else {
70
70
platform::GpuMemcpyPeerSync (dst, dst_place.device , src, src_place.device ,
71
- num, stream );
71
+ num);
72
72
}
73
73
}
74
74
}
@@ -98,7 +98,7 @@ template <>
98
98
void Copy<platform::CUDAPinnedPlace, platform::CUDAPlace>(
99
99
platform::CUDAPinnedPlace dst_place, void * dst,
100
100
platform::CUDAPlace src_place, const void * src, size_t num,
101
- cudaStream_t stream = nullptr ) {
101
+ cudaStream_t stream) {
102
102
platform::SetDeviceId (src_place.device );
103
103
if (stream) {
104
104
platform::GpuMemcpyAsync (dst, src, num, cudaMemcpyDeviceToHost, stream);
@@ -111,7 +111,7 @@ template <>
111
111
void Copy<platform::CUDAPlace, platform::CUDAPinnedPlace>(
112
112
platform::CUDAPlace dst_place, void * dst,
113
113
platform::CUDAPinnedPlace src_place, const void * src, size_t num,
114
- cudaStream_t stream = nullptr ) {
114
+ cudaStream_t stream) {
115
115
platform::SetDeviceId (dst_place.device );
116
116
if (stream) {
117
117
platform::GpuMemcpyAsync (dst, src, num, cudaMemcpyHostToDevice, stream);
0 commit comments