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

Function test_gpu2cpu_arg_input

dali/test/python/test_pipeline.py:2198–2207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2196
2197
2198def test_gpu2cpu_arg_input():
2199 @pipeline_def(batch_size=1, num_threads=4, device_id=0, exec_dynamic=True)
2200 def pdef():
2201 data = dali.types.Constant([42], device="gpu")
2202 resized = fn.zeros(shape=data.cpu(), dtype=types.INT32)
2203 return resized
2204
2205 pipe = pdef()
2206 (o,) = pipe.run()
2207 assert o[0].shape() == [42]
2208
2209
2210def test_gpu2cpu2mixed():

Callers

nothing calls this directly

Calls 3

pdefFunction · 0.85
runMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected