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

Class HybridPipe

dali/test/python/test_pipeline.py:58–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 batch_size = 128
57
58 class HybridPipe(Pipeline):
59 def __init__(self, batch_size, num_threads, device_id, num_gpus):
60 super(HybridPipe, self).__init__(batch_size, num_threads, device_id)
61 self.input = ops.readers.Caffe(
62 path=caffe_db_folder, shard_id=device_id, num_shards=num_gpus
63 )
64 self.decode = ops.decoders.Image(device="cpu", output_type=types.RGB)
65 self.res = ops.Resize(device="cpu", resize_x=224, resize_y=224)
66 self.dump_cpu = ops.DumpImage(device="cpu", suffix="cpu")
67 self.dump_gpu = ops.DumpImage(device="gpu", suffix="gpu")
68
69 def define_graph(self):
70 inputs, labels = self.input(name="Reader")
71 images = self.decode(inputs)
72 images = self.res(images)
73 images_cpu = self.dump_cpu(images)
74 images_gpu = self.dump_gpu(images.gpu())
75 return (images, images_cpu, images_gpu)
76
77 pipe = HybridPipe(batch_size=batch_size, num_threads=1, device_id=0, num_gpus=1)
78 out = pipe.run()

Callers 14

test_seedFunction · 0.85
test_as_arrayFunction · 0.85
test_seed_serializeFunction · 0.85
test_warpaffineFunction · 0.85
test_type_conversionFunction · 0.85
test_as_tensorFunction · 0.85

Calls

no outgoing calls

Tested by 14

test_seedFunction · 0.68
test_as_arrayFunction · 0.68
test_seed_serializeFunction · 0.68
test_warpaffineFunction · 0.68
test_type_conversionFunction · 0.68
test_as_tensorFunction · 0.68