summaryrefslogtreecommitdiff
path: root/src/gpu-compute/wavefront.cc
diff options
context:
space:
mode:
authorAlexandru Dutu <alexandru.dutu@amd.com>2016-09-16 12:27:56 -0400
committerAlexandru Dutu <alexandru.dutu@amd.com>2016-09-16 12:27:56 -0400
commitd5c8c5d3db1954ff4e33dade0812fed7b60a9269 (patch)
treebedbecb25c0b1824e25164b287ad2fdddb65dffa /src/gpu-compute/wavefront.cc
parent589e13a23b3969c1137d2170a8638356d0c0fc65 (diff)
downloadgem5-d5c8c5d3db1954ff4e33dade0812fed7b60a9269.tar.xz
gpu-compute: Adding ioctl for HW context size
Adding runtime support for determining the memory required by a SIMD engine when executing a particular wavefront.
Diffstat (limited to 'src/gpu-compute/wavefront.cc')
-rw-r--r--src/gpu-compute/wavefront.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gpu-compute/wavefront.cc b/src/gpu-compute/wavefront.cc
index c73307ac4..76a0bdf9e 100644
--- a/src/gpu-compute/wavefront.cc
+++ b/src/gpu-compute/wavefront.cc
@@ -155,9 +155,9 @@ Wavefront::~Wavefront()
}
void
-Wavefront::start(uint64_t _wfDynId,uint64_t _base_ptr)
+Wavefront::start(uint64_t _wf_dyn_id,uint64_t _base_ptr)
{
- wfDynId = _wfDynId;
+ wfDynId = _wf_dyn_id;
basePtr = _base_ptr;
status = S_RUNNING;
}
@@ -931,3 +931,13 @@ Wavefront::pc(uint32_t new_pc)
{
reconvergenceStack.top()->pc = new_pc;
}
+
+uint32_t
+Wavefront::getStaticContextSize() const
+{
+ return barCnt.size() * sizeof(int) + sizeof(dynWaveId) + sizeof(maxBarCnt) +
+ sizeof(oldBarrierCnt) + sizeof(barrierCnt) + sizeof(wgId) +
+ sizeof(computeUnit->cu_id) + sizeof(barrierId) + sizeof(initMask) +
+ sizeof(privBase) + sizeof(spillBase) + sizeof(ldsChunk) +
+ computeUnit->wfSize() * sizeof(ReconvergenceStackEntry);
+}