question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Incorrect behavior of asynchronous D2D copy

See original GitHub issue

cupy.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:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
niboshicommented, Jan 14, 2020

@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.).

0reactions
niboshicommented, Jan 14, 2020

Closing, as cupy.copyto has been fixed in #2942 . @jeng1220 @takagi Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found