[BUG] Incorrect behavior of asynchronous D2D copy
See original GitHub issuecupy.copyto
misses to apply user specified stream.
Please see following mini repro.
- Conditions
- CuPy 5.4.0 and 6.0.0rc1
- Ubuntu 16.04
- CUDA 10.1
- Code to reproduce
import cupy as cp
def main():
SIZE = 250000000
a = cp.empty((1, SIZE), cp.float32)
b = cp.empty((1, SIZE), cp.float32)
my_stream = cp.cuda.stream.Stream()
my_stream.use()
cp.copyto(a, b) # <- it will use default stream but it should use `my_stream`
my_stream.synchronize()
my_stream.use()
a[:,:] = b # <- use `my_stream`
my_stream.synchronize()
if __name__ == '__main__':
main()
- Error messages, stack traces, or logs nvvp log
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Odd behavior of cudaMemcpyAsync: 1. cudaMemcpyKind ...
When the cudaMemcpyAsync operation indicates a failure, the operation does not complete successfully, so the data is not copied, and your data ...
Read more >How to Overlap Data Transfers in CUDA C/C++
From the perspective of the host, the implicit data transfers are blocking or synchronous transfers, while the kernel launch is asynchronous.
Read more >Release Notes D2000 Server 12.2.65.u3
Improvements a bug fixes for D2000 V12.2.65.u3 (build 03) ... This parameter copies the behavior of the Telegyr 809 Server protocol parameter with...
Read more >OpenACC.3.0.pdf
The copy, copyin, copyout, and create data clauses were changed to behave like. 509 present_or_copy, etc. The present_or_copy, pcopy ...
Read more >Back up user data with Auto Backup - Android Developers
Note: For apps running on and targeting Android 12 (API level 31) or higher, specifying android:allowBackup="false" does disable backups to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@takagi Thanks. If the synchronization only occurs once at the first
dot
, we can ignore it. The situation is similar to other functions that trigger kernel compilation on the fly (loading a CUDA module incurs synchronization too.).Closing, as
cupy.copyto
has been fixed in #2942 . @jeng1220 @takagi Thanks!