SWDEV-397168 - Enable dynamic call stack size for PAL.
Change-Id: I8be51ffb48e6a742117491a4bf6f12f152e4a0b3
This commit is contained in:
committed by
Jaydeepkumar Patel
parent
04b696abee
commit
0eb96cbc59
@@ -514,7 +514,10 @@ bool LightningKernel::postLoad() {
|
||||
if (!setKernelCode(sym, &akc_)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sym->GetInfo(HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK,
|
||||
reinterpret_cast<void*>(&kernelHasDynamicCallStack_))) {
|
||||
return false;
|
||||
}
|
||||
if (!prog().isNull()) {
|
||||
codeSize_ = prog().codeSegGpu().owner()->getSize();
|
||||
|
||||
@@ -545,7 +548,7 @@ bool LightningKernel::postLoad() {
|
||||
|
||||
// Copy wavefront size
|
||||
workGroupInfo_.wavefrontSize_ = device().info().wavefrontWidth_;
|
||||
|
||||
workGroupInfo_.usedStackSize_ = kernelHasDynamicCallStack_;
|
||||
if (workGroupInfo_.size_ == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2678,6 +2678,13 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const
|
||||
dispatchParam.scratchSize = scratch->size_;
|
||||
dispatchParam.scratchOffset = scratch->offset_;
|
||||
dispatchParam.workitemPrivateSegmentSize = hsaKernel.spillSegSize();
|
||||
if ((hsaKernel.workGroupInfo()->usedStackSize_ & 0x1) == 0x1) {
|
||||
dispatchParam.workitemPrivateSegmentSize =
|
||||
std::max<uint64_t>(dev().StackSize(), dispatchParam.workitemPrivateSegmentSize);
|
||||
if (dispatchParam.workitemPrivateSegmentSize > 16 * Ki) {
|
||||
dispatchParam.workitemPrivateSegmentSize = 16 * Ki;
|
||||
}
|
||||
}
|
||||
}
|
||||
dispatchParam.pCpuAqlCode = hsaKernel.cpuAqlCode();
|
||||
dispatchParam.hsaQueueVa = hsaQueueMem_->vmAddress();
|
||||
|
||||
Reference in New Issue
Block a user