Skip to content

Code issues in read_buffer.py #82

@Mo-guan

Description

@Mo-guan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions