2
0

SWDEV-408283 - Sync scratchRegs_, privateMemSize_ and workitemPrivateSegmentSize.

Change-Id: I623a7140810ff9867f8816bf4c8621a1fe921744
Este cometimento está contido em:
Jaydeep Patel
2023-07-25 18:45:03 +00:00
cometido por Jaydeepkumar Patel
ascendente c7d8557eee
cometimento ff1a999f66
2 ficheiros modificados com 6 adições e 7 eliminações
+6
Ver ficheiro
@@ -552,6 +552,12 @@ bool LightningKernel::postLoad() {
if (workGroupInfo_.size_ == 0) {
return false;
}
if ((workGroupInfo_.usedStackSize_ & 0x1) == 0x1) {
workGroupInfo_.scratchRegs_ =
std::max<uint32_t>(device().StackSize(), workGroupInfo_.scratchRegs_ * sizeof(uint32_t)) ;
workGroupInfo_.scratchRegs_ = amd::alignUp(workGroupInfo_.scratchRegs_, 16) / sizeof(uint32_t);
workGroupInfo_.privateMemSize_ = workGroupInfo_.scratchRegs_ * sizeof(uint32_t);
}
// handle the printf metadata if any
std::vector<std::string> printfStr;
-7
Ver ficheiro
@@ -2678,13 +2678,6 @@ 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();