()
| 2208 | |
| 2209 | |
| 2210 | def test_gpu2cpu2mixed(): |
| 2211 | bs = 8 |
| 2212 | |
| 2213 | @pipeline_def(batch_size=bs, num_threads=4, device_id=0, exec_dynamic=True) |
| 2214 | def pdef(): |
| 2215 | enc, _ = fn.readers.file(file_root=jpeg_folder) |
| 2216 | img = fn.decoders.image(enc, device="mixed", hw_decoder_load=0) |
| 2217 | enc2 = (enc.gpu() + np.uint8(0)).cpu() |
| 2218 | img2 = fn.decoders.image(enc2, device="mixed", hw_decoder_load=0) |
| 2219 | return img, img2 |
| 2220 | |
| 2221 | pipe = pdef() |
| 2222 | for i in range(10): |
| 2223 | gpu, gpu2 = pipe.run() |
| 2224 | assert isinstance(gpu, dali.backend_impl.TensorListGPU) |
| 2225 | assert isinstance(gpu2, dali.backend_impl.TensorListGPU) |
| 2226 | check_batch(gpu, gpu2, bs, 0, 0, "HWC") |
| 2227 | |
| 2228 | |
| 2229 | def test_shapes_gpu(): |
nothing calls this directly
no test coverage detected