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

Function test_move_to_device_end

dali/test/python/test_dali_cpu_only.py:81–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79
80
81def test_move_to_device_end():
82 test_data_shape = [1, 3, 0, 4]
83
84 def get_data():
85 out = [np.empty(test_data_shape, dtype=np.uint8) for _ in range(batch_size)]
86 return out
87
88 pipe = Pipeline(batch_size=batch_size, num_threads=3, device_id=None)
89 outs = fn.external_source(source=get_data)
90 pipe.set_outputs(outs.gpu())
91 assert_raises(
92 RuntimeError,
93 pipe.build,
94 glob="The pipeline requires a CUDA-capable GPU but *",
95 )
96
97
98def test_move_to_device_middle():

Callers

nothing calls this directly

Calls 4

set_outputsMethod · 0.95
PipelineClass · 0.90
assert_raisesFunction · 0.90
gpuMethod · 0.45

Tested by

no test coverage detected