gpu-compute: Add exp_cnt tracking for buffer store instructions
authorKyle Roarty <kyleroarty1716@gmail.com>
Sat, 14 Nov 2020 19:42:12 +0000 (13:42 -0600)
committerKyle Roarty <kyleroarty1716@gmail.com>
Mon, 30 Nov 2020 20:59:31 +0000 (20:59 +0000)
commit0bb385941b1b4bda9e3d73e76be41b2cc10bdf8a
tree2230bc4873f5a295a92da45ff1c5a560e43a31ca
parentecaf91a65f848f3d5240446b3a8cc048b05bbb7f
gpu-compute: Add exp_cnt tracking for buffer store instructions

exp_cnt (expInstsIssued in the code) is used in the waitcnt instruction
to track that data has been read out of VGPRs in previous global
memory instructions, making it safe to overwrite the VGPRs used in said
global memory instructions.

Previously, exp_cnt wasn't being tracked at all, which lead to the
waitcnt finishing immediately, leading to the memory instruction's VPGRs
getting overwritten by subsequent instructions, causing errors.

This patch makes it so waitcnts waiting on exp_cnt will wait for MUBUF
buffer store instructions to read their VGPRs before completing

Change-Id: Idd2b59511bc086cf316217da27b7a228272b0b0f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37555
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Alexandru Duțu <alexandru.dutu@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/gpu-compute/global_memory_pipeline.cc
src/gpu-compute/schedule_stage.cc