Go to the documentation of this file.
39 #include "debug/GPUSched.hh"
46 : computeUnit(cu), fromSchedule(from_schedule),
47 lastTimeInstExecuted(false),
48 thisTimeInstExecuted(false), instrExecuted (false),
49 executionResourcesUsed(0), _name(cu.
name() +
".ExecStage"),
112 std::string
s(
"INVALID");
130 std::stringstream
ss;
138 Wavefront *wf = gpu_dyn_inst->wavefront();
146 DPRINTF(GPUSched,
"Dispatch List:\n%s",
ss.str());
154 if (Debug::GPUSched) {
169 assert(gpu_dyn_inst);
170 Wavefront *wf = gpu_dyn_inst->wavefront();
171 DPRINTF(GPUSched,
"Exec[%d]: SIMD[%d] WV[%d]: %s\n",
173 gpu_dyn_inst->disassemble());
174 DPRINTF(GPUSched,
"dispatchList[%d] EXREADY->EMPTY\n", unitId);
185 assert(gpu_dyn_inst);
186 Wavefront *wf = gpu_dyn_inst->wavefront();
187 DPRINTF(GPUSched,
"dispatchList[%d] SKIP->EMPTY\n", unitId);
193 panic(
"Unknown dispatch status in exec()\n");
201 :
Stats::Group(parent,
"ExecStage"),
203 "number of CU transitions from active to idle"),
204 ADD_STAT(numCyclesWithNoIssue,
"number of cycles the CU issues nothing"),
206 "number of cycles the CU issued at least one instruction"),
208 "Execution units active per cycle (Exec unit=SIMD,MemPipe)"),
209 ADD_STAT(idleDur,
"duration of idle periods in cycles"),
210 ADD_STAT(numCyclesWithInstrTypeIssued,
"Number of cycles at least one "
211 "instruction issued to execution resource type"),
212 ADD_STAT(numCyclesWithNoInstrTypeIssued,
"Number of clks no instructions"
213 " issued to execution resource type")
bool thisTimeInstExecuted
void collectStatistics(enum STAT_STATUS stage, int unitId)
GPUDynInstPtr & readyInst(int func_unit_id)
std::string dispStatusToStr(int j)
const std::string to_string(sc_enc enc)
DISPATCH_STATUS dispatchStatus(int func_unit_id) const
ScheduleStage scheduleStage
bool lastTimeInstExecuted
void dispatchTransition(const GPUDynInstPtr &gpu_dyn_inst, int func_unit_id, DISPATCH_STATUS disp_status)
Once the scheduler has chosen a winning WF for execution, and after the WF's oldest instruction's ope...
Communication interface between Schedule and Execute stages.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Stats::Scalar numCyclesWithNoIssue
ExecStageStats(Stats::Group *parent)
Stats::Scalar numCyclesWithInstrIssued
ScheduleToExecute & fromSchedule
const std::string & name()
Derived & init(size_type size)
Set this vector to have the given size.
int executionResourcesUsed
Distribution & init(Counter min, Counter max, Counter bkt)
Set the parameters of this distribution.
Stats::Vector numCyclesWithInstrTypeIssued
std::shared_ptr< GPUDynInst > GPUDynInstPtr
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
Stats::Vector numCyclesWithNoInstrTypeIssued
Stats::Scalar numTransActiveIdle
ExecStage(const ComputeUnitParams &p, ComputeUnit &cu, ScheduleToExecute &from_schedule)
std::deque< GPUDynInstPtr > instructionBuffer
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
ExecStage::ExecStageStats stats
ComputeUnit & computeUnit
#define panic(...)
This implements a cprintf based panic() function.
Stats::Distribution idleDur
Generated on Tue Jun 22 2021 15:28:28 for gem5 by doxygen 1.8.17