arch-vega: Fix s_endpgm instruction

Copy over changes that had been made to s_engpgm in GCN3
but weren't added to the Vega implementation

Change-Id: I1063f83b1ce8f7c5e451c8c227265715c8f725b9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47519
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Alex Dutu <alexandru.dutu@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Kyle Roarty
2021-07-01 21:53:46 -05:00
committed by Matt Sinclair
parent 8134902e8b
commit cb73fe1959

View File

@@ -4137,7 +4137,12 @@ namespace VegaISA
ComputeUnit *cu = gpuDynInst->computeUnit();
// delete extra instructions fetched for completed work-items
wf->instructionBuffer.clear();
wf->instructionBuffer.erase(wf->instructionBuffer.begin() + 1,
wf->instructionBuffer.end());
if (wf->pendingFetch) {
wf->dropFetch = true;
}
wf->computeUnit->fetchStage.fetchUnit(wf->simdId)
.flushBuf(wf->wfSlotId);
@@ -4215,8 +4220,11 @@ namespace VegaISA
bool kernelEnd =
wf->computeUnit->shader->dispatcher().isReachingKernelEnd(wf);
bool relNeeded =
wf->computeUnit->shader->impl_kern_end_rel;
//if it is not a kernel end, then retire the workgroup directly
if (!kernelEnd) {
if (!kernelEnd || !relNeeded) {
wf->computeUnit->shader->dispatcher().notifyWgCompl(wf);
wf->setStatus(Wavefront::S_STOPPED);
wf->computeUnit->completedWGs++;
@@ -4232,6 +4240,7 @@ namespace VegaISA
* the complex
*/
setFlag(MemSync);
setFlag(GlobalSegment);
// Notify Memory System of Kernel Completion
// Kernel End = isKernel + isMemSync
wf->setStatus(Wavefront::S_RETURNING);