In line 334-337 of read_buffer.py,
start_idx = self.next_line_prefetch_idx
num_lines = math.ceil(self.prefetch_buf_size / self.req_gen_bandwidth)
end_idx = start_idx + num_lines
requested_data_size = num_lines * self.req_gen_bandwidth
requested_data_size is computed based on self.prefetch_buf_size, then in line 360-364,
if requested_data_size > self.active_buf_size:
valid_cols = int(self.active_buf_size % self.req_gen_bandwidth)
row = prefetch_requests.shape[0] - 1
for col in range(valid_cols, self.req_gen_bandwidth):
prefetch_requests[row][col] = -1
it is compared to the self.active_buf_size, and due to the significant difference in buffer capacity, the code seems to be useless, maybe requested_data_size should be compared with self.prefetch_buf_size considering self.next_col_prefetch_idx
In line 334-337 of read_buffer.py,
requested_data_sizeis computed based onself.prefetch_buf_size, then in line 360-364,it is compared to the
self.active_buf_size, and due to the significant difference in buffer capacity, the code seems to be useless, mayberequested_data_sizeshould be compared withself.prefetch_buf_sizeconsideringself.next_col_prefetch_idx