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

Function test_numpy_reader_alias

dali/test/python/reader/test_numpy.py:492–504  ·  view source on GitHub ↗
(device)

Source from the content-addressed store, hash-verified

490
491@params(*(["cpu", "gpu"] if is_gds_supported() else ["cpu"]))
492def test_numpy_reader_alias(device):
493 with tempfile.TemporaryDirectory(prefix=gds_data_root) as test_data_root:
494 # create files
495 num_samples = 20
496 filenames = []
497 arr_np_list = []
498 for index in range(0, num_samples):
499 filename = os.path.join(test_data_root, "test_{:02d}.npy".format(index))
500 filenames.append(filename)
501 create_numpy_file(filename, (5, 2, 8), np.float32, False)
502 arr_np_list.append(np.load(filename))
503
504 check_numpy_reader_alias(test_data_root, device)
505
506
507@pipeline_def(device_id=0, num_threads=8)

Callers

nothing calls this directly

Calls 4

check_numpy_reader_aliasFunction · 0.85
create_numpy_fileFunction · 0.70
appendMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected