Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Once trace is done, mark warps as complete, flush ibuffer #383

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions gpu-simulator/trace-driven/trace_driven.cc
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,10 @@ void trace_shader_core_ctx::get_pdom_stack_top_info(unsigned warp_id,
unsigned *pc,
unsigned *rpc) {
// In trace-driven mode, we assume no control hazard
// if(pI){
*pc = pI->pc;
*rpc = pI->pc;
//}
}

const active_mask_t &trace_shader_core_ctx::get_active_mask(
Expand Down Expand Up @@ -625,9 +627,9 @@ void trace_shader_core_ctx::checkExecutionStatusAndUpdate(warp_inst_t &inst,
inst.set_addr(t, (new_addr_type *)localaddrs, num_addrs);
}

if (inst.op == EXIT_OPS) {
m_warp[inst.warp_id()]->set_completed(t);
}
//if (inst.op == EXIT_OPS) {
// m_warp[inst.warp_id()]->set_completed(t);
//}
}

void trace_shader_core_ctx::func_exec_inst(warp_inst_t &inst) {
Expand All @@ -639,6 +641,7 @@ void trace_shader_core_ctx::func_exec_inst(warp_inst_t &inst) {
// virtual function
checkExecutionStatusAndUpdate(inst, t, tid);
}

}

// here, we generate memory acessess and set the status if thread (done?)
Expand All @@ -648,7 +651,11 @@ void trace_shader_core_ctx::func_exec_inst(warp_inst_t &inst) {

trace_shd_warp_t *m_trace_warp =
static_cast<trace_shd_warp_t *>(m_warp[inst.warp_id()]);
if (m_trace_warp->trace_done() && m_trace_warp->functional_done()) {
if (m_trace_warp->trace_done()) {
for(unsigned t = 0; t < m_warp_size; t++)
{
m_warp[inst.warp_id()]->set_completed(t);
}
m_trace_warp->ibuffer_flush();
m_barriers.warp_exit(inst.warp_id());
}
Expand Down
Loading