MCPcopy Create free account
hub / github.com/NVIDIA/DALI / _test_external_source_iter

Function _test_external_source_iter

dali/test/python/test_external_source_impl.py:298–314  ·  view source on GitHub ↗
(use_fn_api, device)

Source from the content-addressed store, hash-verified

296
297
298def _test_external_source_iter(use_fn_api, device):
299 iter_num = 5
300 batch_size = 9
301 pipe = Pipeline(batch_size, 3, 0)
302
303 # this should produce a single Tensor / TensorList per batch,
304 # not wrapped in additional list
305 source = TestIterator(iter_num, batch_size, 4, device == "gpu")
306
307 if use_fn_api:
308 input = fn.external_source(source, device=device)
309 else:
310 ext_source = ops.ExternalSource(source, device=device)
311 input = ext_source()
312 pipe.set_outputs(input)
313
314 run_and_check(pipe, source)
315
316
317def test_external_source_iter():

Callers

nothing calls this directly

Calls 5

set_outputsMethod · 0.95
PipelineClass · 0.90
ExternalSourceMethod · 0.80
TestIteratorClass · 0.70
run_and_checkFunction · 0.70

Tested by

no test coverage detected