-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Labels
gpgpu-simIssue related to gpgpu-sim modelIssue related to gpgpu-sim model
Description
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 = ®s[i];
reg_id = i;
}
}
}
return reg_id;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
gpgpu-simIssue related to gpgpu-sim modelIssue related to gpgpu-sim model