MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / test_wrap_stream_external

Function test_wrap_stream_external

tests/cvcuda/python/test_stream.py:117–131  ·  view source on GitHub ↗
(stream_type)

Source from the content-addressed store, hash-verified

115 reason="Test not supported on ARM64 with PyTorch versions < 2.0.0",
116)
117def 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
134def test_stream_default_is_zero():

Callers

nothing calls this directly

Calls 2

streamMethod · 0.80
cuda_streamMethod · 0.80

Tested by

no test coverage detected