mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 00:03:14 +08:00
fix: Update SyncBuffer size calculation
Add a constant to describe minimal size of SyncBuffer object. Related-To: HSD-18039952263, HSD-18039940553, HSD-18039937640 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6123078215
commit
388c7dc591
@@ -9,9 +9,9 @@
|
||||
|
||||
template <typename KernelT>
|
||||
void NEO::SyncBufferHandler::prepareForEnqueue(size_t workGroupsCount, KernelT &kernel) {
|
||||
auto requiredSize = alignUp(workGroupsCount, CommonConstants::maximalSizeOfAtomicType);
|
||||
auto requiredSize = alignUp(std::max(workGroupsCount, static_cast<size_t>(CommonConstants::minimalSyncBufferSize)), CommonConstants::maximalSizeOfAtomicType);
|
||||
|
||||
auto patchData = obtainAllocationAndOffset(requiredSize);
|
||||
|
||||
kernel.patchSyncBuffer(patchData.first, patchData.second);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user