Skip to content

[GPGPU-Sim] Possible stalls when allocate_cu always choose the oldest subcore. #515

@Ivecia

Description

@Ivecia

Hi, community. I'm wondering whether it's a mistake for allocate_cu to choose the oldest subcore instead of a subcore containing a valid (has valid instruction, and has a free cu) instruction.

Assuming that there are IADD for subcore 0, ready for operand collect at cycle 5100, and another IADD for subcore 1, ready for operand collect at cycle 5101. No other instructions for subcore 2 and 3. At this time, current implementation will choose subcore 0, since it is the oldest. But if cus in subcore 0 are all busy, it will NOT check if we can collect operands for IADD in subcore 1.

Is it a mistake or a kind of feature here? Thanks!

  • get_ready_reg_id(): Always choose the oldest subcore with a ready instruction, but did not consider whether it's free to allocate a cu.
unsigned get_ready_reg_id() {
  // for sub core model we need to figure which reg_id has the ready warp
  // this function should only be called if has_ready() was true
  assert(has_ready());
  warp_inst_t **ready;
  ready = NULL;
  unsigned reg_id = 0;
  for (unsigned i = 0; i < regs.size(); i++) {
    if (not regs[i]->empty()) {
      if (ready and (*ready)->get_uid() < regs[i]->get_uid()) {
        // ready is oldest
      } else {
        ready = &regs[i];
        reg_id = i;
      }
    }
  }
  return reg_id;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    gpgpu-simIssue related to gpgpu-sim model

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions