(stream_type)
| 115 | reason="Test not supported on ARM64 with PyTorch versions < 2.0.0", |
| 116 | ) |
| 117 | def test_wrap_stream_external(stream_type): |
| 118 | extstream = stream_type() |
| 119 | |
| 120 | stream = cvcuda.as_stream(extstream.stream()) |
| 121 | |
| 122 | assert extstream.cuda_stream() == stream.handle |
| 123 | |
| 124 | # stream must hold a ref to the external stream, the wrapped cudaStream |
| 125 | # must not have been deleted |
| 126 | del extstream |
| 127 | |
| 128 | extstream = stream_type(stream.handle) |
| 129 | stream = cvcuda.as_stream(extstream.stream()) |
| 130 | |
| 131 | assert extstream.cuda_stream() == stream.handle |
| 132 | |
| 133 | |
| 134 | def test_stream_default_is_zero(): |
nothing calls this directly
no test coverage detected