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.
This commit is contained in:
Alexandru Dutu
2016-09-16 12:27:56 -04:00
parent 589e13a23b
commit d5c8c5d3db
6 changed files with 35 additions and 2 deletions

View File

@@ -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);