summaryrefslogtreecommitdiff
path: root/src/gpu-compute/cl_driver.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/cl_driver.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/cl_driver.cc')
-rw-r--r--src/gpu-compute/cl_driver.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu-compute/cl_driver.cc b/src/gpu-compute/cl_driver.cc
index 6bb6be102..d3950ec04 100644
--- a/src/gpu-compute/cl_driver.cc
+++ b/src/gpu-compute/cl_driver.cc
@@ -242,6 +242,13 @@ ClDriver::ioctl(LiveProcess *process, ThreadContext *tc, unsigned req)
buf.copyOut(tc->getMemProxy());
}
break;
+ case HSA_GET_HW_STATIC_CONTEXT_SIZE:
+ {
+ BufferArg buf(buf_addr, sizeof(uint32_t));
+ *((uint32_t*)buf.bufferPtr()) = dispatcher->getStaticContextSize();
+ buf.copyOut(tc->getMemProxy());
+ }
+ break;
default:
fatal("ClDriver: bad ioctl %d\n", req);