Gets a background stream for copying between CPU and GPU
(device)
| 102 | |
| 103 | |
| 104 | def _get_stream(device): |
| 105 | """Gets a background stream for copying between CPU and GPU""" |
| 106 | global _streams |
| 107 | if device == -1: |
| 108 | return None |
| 109 | if _streams is None: |
| 110 | _streams = [None] * cuda.device_count() |
| 111 | if _streams[device] is None: _streams[device] = cuda.Stream(device) |
| 112 | return _streams[device] |
no outgoing calls
no test coverage detected