SWDEV-331066 - support for LimitStackSize

Change-Id: Ie6ae74f008b4f72de83663194aafb0ebdddfc8b6
This commit is contained in:
Sarbojit Sarkar authored and Sarbojit Sarkar committed 2022-05-19 00:24:06 -04:00
1 parent ef041e81b1
commit 51a00aeefe
5 files changed
+36 -3

No files matched your search

+9
View File
@@ -718,6 +718,15 @@ bool Device::getDeviceIDs(cl_device_type deviceType, uint32_t numEntries, cl_dev
return true;
}
bool Device::UpdateStackSize(uint64_t stackSize) {
uint32_t maxMemPerThread = info().localMemSizePerCU_ / info().maxThreadsPerCU_;
if (maxMemPerThread < stackSize) {
return false;
}
stack_size_ = stackSize;
return true;
}
char* Device::getExtensionString() {
std::stringstream extStream;
size_t size;