Πηγαίνετε εκτός σύνδεσης με την εφαρμογή Player FM !
Asynchronous versus synchronous execution
Manage episode 298430836 series 2921809
CUDA is asynchronous, CPU is synchronous. Making them play well together can be one of the more thorny and easy to get wrong aspects of the PyTorch API. I talk about why non_blocking is difficult to use correctly, a hypothetical "asynchronous CPU" device which would help smooth over some of the API problems and also why it used to be difficult to implement async CPU (but it's not hard anymore!) At the end, I also briefly talk about how async/sync impedance can also show up in unusual places, namely the CUDA caching allocator.
Further reading.
- CUDA semantics which discuss non_blocking somewhat https://pytorch.org/docs/stable/notes/cuda.html
- Issue requesting async cpu https://github.com/pytorch/pytorch/issues/44343
83 επεισόδια
Manage episode 298430836 series 2921809
CUDA is asynchronous, CPU is synchronous. Making them play well together can be one of the more thorny and easy to get wrong aspects of the PyTorch API. I talk about why non_blocking is difficult to use correctly, a hypothetical "asynchronous CPU" device which would help smooth over some of the API problems and also why it used to be difficult to implement async CPU (but it's not hard anymore!) At the end, I also briefly talk about how async/sync impedance can also show up in unusual places, namely the CUDA caching allocator.
Further reading.
- CUDA semantics which discuss non_blocking somewhat https://pytorch.org/docs/stable/notes/cuda.html
- Issue requesting async cpu https://github.com/pytorch/pytorch/issues/44343
83 επεισόδια
Tous les épisodes
×Καλώς ήλθατε στο Player FM!
Το FM Player σαρώνει τον ιστό για podcasts υψηλής ποιότητας για να απολαύσετε αυτή τη στιγμή. Είναι η καλύτερη εφαρμογή podcast και λειτουργεί σε Android, iPhone και στον ιστό. Εγγραφή για συγχρονισμό συνδρομών σε όλες τις συσκευές.