From ecc384a8561f5760129f26e7f872798a73e4a24f Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Wed, 30 Oct 2024 11:26:32 -0500 Subject: [PATCH] Update indexed_binary_mmap_reader.py --- dlio_benchmark/reader/indexed_binary_mmap_reader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlio_benchmark/reader/indexed_binary_mmap_reader.py b/dlio_benchmark/reader/indexed_binary_mmap_reader.py index 7a06323d..3e0313ef 100644 --- a/dlio_benchmark/reader/indexed_binary_mmap_reader.py +++ b/dlio_benchmark/reader/indexed_binary_mmap_reader.py @@ -61,6 +61,9 @@ def load_index_file(self, global_sample_idx, filename, sample_index): bin_buffer_mmap = np.memmap(sz_file, mode='r', order='C') bin_buffer = memoryview(bin_buffer_mmap) self.file_map_ibr[filename].append(np.frombuffer(bin_buffer, dtype=np.uint64)) + bin_buffer_mmap = np.memmap(filename, mode='r', order='C') + bin_buffer = memoryview(bin_buffer_mmap) + self.buffer_map[filename] = np.frombuffer(bin_buffer, dtype=np.uint8) @dlp.log def load_index(self):