()
| 2179 | |
| 2180 | |
| 2181 | def test_gpu2cpu(): |
| 2182 | bs = 8 |
| 2183 | |
| 2184 | @pipeline_def(batch_size=bs, num_threads=4, device_id=0, exec_dynamic=True) |
| 2185 | def pdef(): |
| 2186 | enc, _ = fn.readers.file(file_root=jpeg_folder) |
| 2187 | img = fn.decoders.image(enc, device="mixed") |
| 2188 | return img, img.cpu() |
| 2189 | |
| 2190 | pipe = pdef() |
| 2191 | for i in range(10): |
| 2192 | gpu, cpu = pipe.run() |
| 2193 | assert isinstance(gpu, dali.backend_impl.TensorListGPU) |
| 2194 | assert isinstance(cpu, dali.backend_impl.TensorListCPU) |
| 2195 | check_batch(cpu, gpu, bs, 0, 0, "HWC") |
| 2196 | |
| 2197 | |
| 2198 | def test_gpu2cpu_arg_input(): |
nothing calls this directly
no test coverage detected