Matt Sinclair has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/47519 )
Change subject: arch-vega: Fix s_endpgm instruction
......................................................................
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 <mattdsincl...@gmail.com>
Reviewed-by: Matthew Poremba <matthew.pore...@amd.com>
Reviewed-by: Alex Dutu <alexandru.d...@amd.com>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/amdgpu/vega/insts/instructions.cc
1 file changed, 11 insertions(+), 2 deletions(-)
Approvals:
Alex Dutu: Looks good to me, approved
Matthew Poremba: Looks good to me, approved
Matt Sinclair: Looks good to me, but someone else must approve; Looks
good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/amdgpu/vega/insts/instructions.cc
b/src/arch/amdgpu/vega/insts/instructions.cc
index 47ea892..6e8c854 100644
--- a/src/arch/amdgpu/vega/insts/instructions.cc
+++ b/src/arch/amdgpu/vega/insts/instructions.cc
@@ -4137,7 +4137,12 @@
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 @@
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 @@
* the complex
*/
setFlag(MemSync);
+ setFlag(GlobalSegment);
// Notify Memory System of Kernel Completion
// Kernel End = isKernel + isMemSync
wf->setStatus(Wavefront::S_RETURNING);
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47519
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I1063f83b1ce8f7c5e451c8c227265715c8f725b9
Gerrit-Change-Number: 47519
Gerrit-PatchSet: 2
Gerrit-Owner: Kyle Roarty <kyleroarty1...@gmail.com>
Gerrit-Reviewer: Alex Dutu <alexandru.d...@amd.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s