|
gem5 [DEVELOP-FOR-25.1]
|
#include <hsa_queue_entry.hh>
Public Member Functions | |
| HSAQueueEntry (std::string kernel_name, uint32_t queue_id, int dispatch_id, void *disp_pkt, AMDKernelCode *akc, Addr host_pkt_addr, Addr code_addr, GfxVersion gfx_version) | |
| const GfxVersion & | gfxVersion () const |
| const std::string & | kernelName () const |
| int | wgSize (int dim) const |
| int | gridSize (int dim) const |
| int | numVectorRegs () const |
| int | numScalarRegs () const |
| uint32_t | queueId () const |
| int | dispatchId () const |
| void * | dispPktPtr () |
| Addr | hostDispPktAddr () const |
| Addr | completionSignal () const |
| Addr | codeAddr () const |
| Addr | kernargAddr () const |
| int | ldsSize () const |
| int | privMemPerItem () const |
| int | contextId () const |
| bool | dispComplete () const |
| int | wgId (int dim) const |
| void | wgId (int dim, int val) |
| int | globalWgId () const |
| void | globalWgId (int val) |
| int | numWg (int dim) const |
| void | notifyWgCompleted () |
| int | numWgCompleted () const |
| int | numWgTotal () const |
| void | markWgDispatch () |
| int | numWgAtBarrier () const |
| bool | vgprBitEnabled (int bit) const |
| bool | sgprBitEnabled (int bit) const |
| int | outstandingInvs () |
| bool | isInvStarted () |
| Whether invalidate has started or finished -1 is the initial value indicating inv has not started for the kernel. | |
| void | updateOutstandingInvs (int val) |
| update the number of pending invalidate requests | |
| void | markInvDone () |
| Forcefully change the state to be inv done. | |
| bool | isInvDone () const |
| Is invalidate done? | |
| int | outstandingWbs () const |
| void | updateOutstandingWbs (int val) |
| Update the number of pending writeback requests. | |
| unsigned | accumOffset () const |
| void | preloadLength (unsigned val) |
| unsigned | preloadLength () const |
| uint32_t * | preloadArgs () |
Public Attributes | |
| Addr | hostAMDQueueAddr |
| Host-side addr of the amd_queue_t on which this task was queued. | |
| _amd_queue_t | amdQueue |
| Keep a copy of the AMD HSA queue because we need info from some of its fields to initialize register state. | |
Static Public Attributes | |
| static const int | MAX_DIM = 3 |
Private Member Functions | |
| void | parseKernelCode (AMDKernelCode *akc) |
Private Attributes | |
| GfxVersion | _gfxVersion |
| std::string | kernName |
| std::array< int, MAX_DIM > | _wgSize |
| std::array< int, MAX_DIM > | _gridSize |
| int | numVgprs |
| int | numSgprs |
| uint32_t | _queueId |
| int | _dispatchId |
| void * | dispPkt |
| Addr | _hostDispPktAddr |
| Addr | _completionSignal |
| Addr | codeAddress |
| Addr | kernargAddress |
| int | _outstandingInvs |
| Number of outstanding invs for the kernel. | |
| int | _outstandingWbs |
| Number of outstanding wbs for the kernel values: 0: 1)initial value, flush has not started for the kernel 2)+1->0: all wb requests are finished, i.e., flush done ? | |
| int | _ldsSize |
| int | _privMemPerItem |
| int | _contextId |
| std::array< int, MAX_DIM > | _wgId |
| std::array< int, MAX_DIM > | _numWg |
| int | _numWgTotal |
| int | numWgArrivedAtBarrier |
| int | _numWgCompleted |
| int | _globalWgId |
| bool | dispatchComplete |
| std::bitset< NumVectorInitFields > | initialVgprState |
| std::bitset< NumScalarInitFields > | initialSgprState |
| unsigned | _accumOffset |
| unsigned | _preloadLength = 0 |
| uint32_t | _preloadArgs [KernargPreloadPktSize/sizeof(uint32_t)] |
Definition at line 60 of file hsa_queue_entry.hh.
|
inline |
Definition at line 63 of file hsa_queue_entry.hh.
References _gfxVersion, _wgSize, and kernName.
|
inline |
Definition at line 407 of file hsa_queue_entry.hh.
References _accumOffset.
Referenced by gem5::Wavefront::initRegState().
|
inline |
Definition at line 205 of file hsa_queue_entry.hh.
References codeAddress.
Referenced by gem5::GPUCommandProcessor::dispatchKernelObject(), and gem5::ComputeUnit::startWavefront().
|
inline |
Definition at line 199 of file hsa_queue_entry.hh.
References _completionSignal.
Referenced by gem5::GPUCommandProcessor::dispatchKernelObject(), and gem5::GPUCommandProcessor::submitAgentDispatchPkt().
|
inline |
Definition at line 225 of file hsa_queue_entry.hh.
References _contextId.
|
inline |
Definition at line 181 of file hsa_queue_entry.hh.
References _dispatchId.
Referenced by gem5::GPUDispatcher::dispatch(), gem5::ComputeUnit::dispWorkgroup(), gem5::Wavefront::initRegState(), gem5::Shader::prepareInvalidate(), and gem5::ComputeUnit::startWavefront().
|
inline |
Definition at line 231 of file hsa_queue_entry.hh.
References dispatchComplete.
Referenced by gem5::Shader::dispatchWorkgroups().
|
inline |
Definition at line 187 of file hsa_queue_entry.hh.
References dispPkt.
Referenced by gem5::GPUCommandProcessor::dispatchKernelObject(), and gem5::GPUCommandProcessor::readPreload().
|
inline |
Definition at line 137 of file hsa_queue_entry.hh.
References _gfxVersion.
Referenced by gem5::Wavefront::initRegState().
|
inline |
Definition at line 251 of file hsa_queue_entry.hh.
References _globalWgId.
Referenced by gem5::Shader::dispatchWorkgroups(), gem5::ComputeUnit::dispWorkgroup(), and gem5::ComputeUnit::startWavefront().
|
inline |
Definition at line 257 of file hsa_queue_entry.hh.
References _globalWgId, and gem5::X86ISA::val.
|
inline |
Definition at line 156 of file hsa_queue_entry.hh.
References _gridSize, and MAX_DIM.
Referenced by gem5::ComputeUnit::fillKernelState(), gem5::ComputeUnit::hasDispResources(), and markWgDispatch().
|
inline |
Definition at line 193 of file hsa_queue_entry.hh.
References _hostDispPktAddr.
Referenced by gem5::Wavefront::initRegState().
|
inline |
Is invalidate done?
Definition at line 382 of file hsa_queue_entry.hh.
References _outstandingInvs.
Referenced by gem5::ComputeUnit::dispWorkgroup().
|
inline |
Whether invalidate has started or finished -1 is the initial value indicating inv has not started for the kernel.
Definition at line 352 of file hsa_queue_entry.hh.
References _outstandingInvs.
Referenced by gem5::Shader::prepareInvalidate().
|
inline |
Definition at line 211 of file hsa_queue_entry.hh.
References kernargAddress.
Referenced by gem5::Wavefront::initRegState().
|
inline |
Definition at line 143 of file hsa_queue_entry.hh.
References kernName.
Referenced by gem5::GPUDispatcher::dispatch().
|
inline |
Definition at line 217 of file hsa_queue_entry.hh.
References _ldsSize.
Referenced by gem5::ComputeUnit::dispWorkgroup(), and gem5::ComputeUnit::hasDispResources().
|
inline |
Forcefully change the state to be inv done.
Definition at line 373 of file hsa_queue_entry.hh.
References _outstandingInvs.
|
inline |
Definition at line 288 of file hsa_queue_entry.hh.
References _globalWgId, _wgId, dispatchComplete, gridSize(), wgId(), and wgSize().
Referenced by gem5::Shader::dispatchWorkgroups().
|
inline |
Definition at line 270 of file hsa_queue_entry.hh.
References _numWgCompleted.
|
inline |
Definition at line 169 of file hsa_queue_entry.hh.
References numSgprs.
Referenced by gem5::GPUCommandProcessor::dispatchKernelObject(), gem5::ComputeUnit::dispWorkgroup(), gem5::ComputeUnit::fillKernelState(), and gem5::ComputeUnit::hasDispResources().
|
inline |
Definition at line 163 of file hsa_queue_entry.hh.
References numVgprs.
Referenced by gem5::GPUCommandProcessor::dispatchKernelObject(), gem5::ComputeUnit::dispWorkgroup(), gem5::ComputeUnit::fillKernelState(), and gem5::ComputeUnit::hasDispResources().
|
inline |
Definition at line 263 of file hsa_queue_entry.hh.
References _numWg, and MAX_DIM.
Referenced by gem5::ComputeUnit::startWavefront().
|
inline |
Definition at line 309 of file hsa_queue_entry.hh.
References numWgArrivedAtBarrier.
|
inline |
Definition at line 276 of file hsa_queue_entry.hh.
References _numWgCompleted.
|
inline |
Definition at line 282 of file hsa_queue_entry.hh.
References _numWgTotal.
|
inline |
Definition at line 342 of file hsa_queue_entry.hh.
References _outstandingInvs.
Referenced by gem5::Shader::prepareInvalidate().
|
inline |
Definition at line 389 of file hsa_queue_entry.hh.
References _outstandingWbs.
|
inlineprivate |
set the enable bits for the initial SGPR state
set the enable bits for the initial VGPR state. the workitem Id in the X dimension is always initialized.
Definition at line 440 of file hsa_queue_entry.hh.
References gem5::DispatchId, gem5::DispatchPtr, gem5::GEM5_PACKED::enable_private_segment, gem5::GEM5_PACKED::enable_sgpr_dispatch_id, gem5::GEM5_PACKED::enable_sgpr_dispatch_ptr, gem5::GEM5_PACKED::enable_sgpr_flat_scratch_init, gem5::GEM5_PACKED::enable_sgpr_kernarg_segment_ptr, gem5::GEM5_PACKED::enable_sgpr_private_segment_buffer, gem5::GEM5_PACKED::enable_sgpr_private_segment_size, gem5::GEM5_PACKED::enable_sgpr_queue_ptr, gem5::GEM5_PACKED::enable_sgpr_workgroup_id_x, gem5::GEM5_PACKED::enable_sgpr_workgroup_id_y, gem5::GEM5_PACKED::enable_sgpr_workgroup_id_z, gem5::GEM5_PACKED::enable_sgpr_workgroup_info, gem5::GEM5_PACKED::enable_vgpr_workitem_id, gem5::FlatScratchInit, initialSgprState, initialVgprState, gem5::KernargSegPtr, gem5::PrivateSegBuf, gem5::PrivateSegSize, gem5::PrivSegWaveByteOffset, gem5::QueuePtr, gem5::WorkgroupIdX, gem5::WorkgroupIdY, gem5::WorkgroupIdZ, gem5::WorkgroupInfo, gem5::WorkitemIdX, gem5::WorkitemIdY, and gem5::WorkitemIdZ.
|
inline |
Definition at line 433 of file hsa_queue_entry.hh.
References _preloadArgs.
Referenced by gem5::GPUCommandProcessor::initPreload(), gem5::Wavefront::initRegState(), and gem5::GPUCommandProcessor::readPreload().
|
inline |
Definition at line 427 of file hsa_queue_entry.hh.
References _preloadLength.
|
inline |
set the enable bit for KernargPreload if used. The preloaded kernargs go between private segment size and sgpr workgroup IDs.
Definition at line 413 of file hsa_queue_entry.hh.
References _preloadLength, initialSgprState, gem5::KernargPreload, and gem5::X86ISA::val.
Referenced by gem5::GPUCommandProcessor::initPreload(), and gem5::Wavefront::initRegState().
|
inline |
Definition at line 222 of file hsa_queue_entry.hh.
References _privMemPerItem.
Referenced by gem5::Wavefront::initRegState(), and gem5::GPUCommandProcessor::MQDDmaEvent().
|
inline |
Definition at line 175 of file hsa_queue_entry.hh.
References _queueId.
Referenced by gem5::GPUCommandProcessor::dispatchKernelObject(), gem5::GPUCommandProcessor::initABI(), gem5::GPUCommandProcessor::MQDDmaEvent(), and gem5::GPUCommandProcessor::ReadDispIdOffsetDmaEvent().
|
inline |
Definition at line 319 of file hsa_queue_entry.hh.
References initialSgprState.
Referenced by gem5::Wavefront::initRegState().
|
inline |
update the number of pending invalidate requests
val: negative to decrement, positive to increment
Definition at line 363 of file hsa_queue_entry.hh.
References _outstandingInvs, and gem5::X86ISA::val.
|
inline |
Update the number of pending writeback requests.
val: negative to decrement, positive to increment
Definition at line 400 of file hsa_queue_entry.hh.
References _outstandingWbs, and gem5::X86ISA::val.
|
inline |
Definition at line 314 of file hsa_queue_entry.hh.
References initialVgprState.
Referenced by gem5::Wavefront::initRegState().
|
inline |
Definition at line 237 of file hsa_queue_entry.hh.
References _wgId, and MAX_DIM.
Referenced by gem5::Wavefront::computeActualWgSz(), gem5::ComputeUnit::hasDispResources(), and markWgDispatch().
|
inline |
Definition at line 244 of file hsa_queue_entry.hh.
References _wgId, MAX_DIM, and gem5::X86ISA::val.
|
inline |
Definition at line 149 of file hsa_queue_entry.hh.
References _wgSize, and MAX_DIM.
Referenced by gem5::ComputeUnit::fillKernelState(), gem5::ComputeUnit::hasDispResources(), and markWgDispatch().
|
private |
Definition at line 534 of file hsa_queue_entry.hh.
Referenced by accumOffset().
|
private |
Definition at line 497 of file hsa_queue_entry.hh.
Referenced by completionSignal().
|
private |
Definition at line 521 of file hsa_queue_entry.hh.
Referenced by contextId().
|
private |
Definition at line 491 of file hsa_queue_entry.hh.
Referenced by dispatchId().
|
private |
Definition at line 478 of file hsa_queue_entry.hh.
Referenced by gfxVersion(), and HSAQueueEntry().
|
private |
Definition at line 528 of file hsa_queue_entry.hh.
Referenced by globalWgId(), globalWgId(), and markWgDispatch().
|
private |
Definition at line 484 of file hsa_queue_entry.hh.
Referenced by gridSize().
|
private |
Definition at line 495 of file hsa_queue_entry.hh.
Referenced by hostDispPktAddr().
|
private |
Definition at line 519 of file hsa_queue_entry.hh.
Referenced by ldsSize().
|
private |
Definition at line 523 of file hsa_queue_entry.hh.
Referenced by numWg().
|
private |
Definition at line 527 of file hsa_queue_entry.hh.
Referenced by notifyWgCompleted(), and numWgCompleted().
|
private |
Definition at line 524 of file hsa_queue_entry.hh.
Referenced by numWgTotal().
|
private |
Number of outstanding invs for the kernel.
values: -1: initial value, invalidate has not started for the kernel 0: 1)-1->0, about to start (a transient state, added in the same cycle) 2)+1->0, all inv requests are finished, i.e., invalidate done ?: positive value, indicating the number of pending inv requests
Definition at line 510 of file hsa_queue_entry.hh.
Referenced by isInvDone(), isInvStarted(), markInvDone(), outstandingInvs(), and updateOutstandingInvs().
|
private |
Number of outstanding wbs for the kernel values: 0: 1)initial value, flush has not started for the kernel 2)+1->0: all wb requests are finished, i.e., flush done ?
: positive value, indicating the number of pending wb requests
Definition at line 518 of file hsa_queue_entry.hh.
Referenced by outstandingWbs(), and updateOutstandingWbs().
|
private |
Definition at line 541 of file hsa_queue_entry.hh.
Referenced by preloadArgs().
|
private |
Definition at line 540 of file hsa_queue_entry.hh.
Referenced by preloadLength(), and preloadLength().
|
private |
Definition at line 520 of file hsa_queue_entry.hh.
Referenced by privMemPerItem().
|
private |
Definition at line 490 of file hsa_queue_entry.hh.
Referenced by queueId().
|
private |
Definition at line 522 of file hsa_queue_entry.hh.
Referenced by markWgDispatch(), wgId(), and wgId().
|
private |
Definition at line 482 of file hsa_queue_entry.hh.
Referenced by HSAQueueEntry(), and wgSize().
| _amd_queue_t gem5::HSAQueueEntry::amdQueue |
Keep a copy of the AMD HSA queue because we need info from some of its fields to initialize register state.
Definition at line 335 of file hsa_queue_entry.hh.
Referenced by gem5::Wavefront::initRegState(), gem5::GPUCommandProcessor::MQDDmaEvent(), gem5::GPUCommandProcessor::ReadDispIdOffsetDmaEvent(), and gem5::GPUCommandProcessor::WaitScratchDmaEvent().
|
private |
Definition at line 499 of file hsa_queue_entry.hh.
Referenced by codeAddr().
|
private |
Definition at line 529 of file hsa_queue_entry.hh.
Referenced by dispComplete(), and markWgDispatch().
|
private |
Definition at line 493 of file hsa_queue_entry.hh.
Referenced by dispPktPtr().
| Addr gem5::HSAQueueEntry::hostAMDQueueAddr |
Host-side addr of the amd_queue_t on which this task was queued.
Definition at line 328 of file hsa_queue_entry.hh.
Referenced by gem5::Wavefront::initRegState(), gem5::GPUCommandProcessor::ReadDispIdOffsetDmaEvent(), and gem5::GPUCommandProcessor::WaitScratchDmaEvent().
|
private |
Definition at line 532 of file hsa_queue_entry.hh.
Referenced by parseKernelCode(), preloadLength(), and sgprBitEnabled().
|
private |
Definition at line 531 of file hsa_queue_entry.hh.
Referenced by parseKernelCode(), and vgprBitEnabled().
|
private |
Definition at line 501 of file hsa_queue_entry.hh.
Referenced by kernargAddr().
|
private |
Definition at line 480 of file hsa_queue_entry.hh.
Referenced by HSAQueueEntry(), and kernelName().
|
static |
Definition at line 338 of file hsa_queue_entry.hh.
Referenced by gem5::Wavefront::computeActualWgSz(), gridSize(), gem5::ComputeUnit::hasDispResources(), numWg(), wgId(), wgId(), and wgSize().
|
private |
Definition at line 488 of file hsa_queue_entry.hh.
Referenced by numScalarRegs().
|
private |
Definition at line 486 of file hsa_queue_entry.hh.
Referenced by numVectorRegs().
|
private |
Definition at line 525 of file hsa_queue_entry.hh.
Referenced by numWgAtBarrier().