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

Function test_ref_count

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

Source from the content-addressed store, hash-verified

1572
1573
1574def test_ref_count():
1575 class HybridPipe(Pipeline):
1576 def __init__(self):
1577 super(HybridPipe, self).__init__(1, 1, 0, seed=12)
1578 self.input = ops.readers.Caffe(path=caffe_db_folder, random_shuffle=True)
1579
1580 def define_graph(self):
1581 _, self.labels = self.input()
1582 return self.labels
1583
1584 pipe = HybridPipe()
1585 ref = weakref.ref(pipe)
1586 del pipe
1587 gc.collect()
1588 assert ref() is None, "Pipeline leaked a reference"
1589
1590
1591def test_executor_meta():

Callers

nothing calls this directly

Calls 3

HybridPipeClass · 0.85
refFunction · 0.85
collectMethod · 0.80

Tested by

no test coverage detected