Files
compute-runtime/opencl/source/helpers/dispatch_info.cpp
Katarzyna Cencelewska 59683ec491 Remove device enqueue part 6
- isParentKernel, peekParentKernel, parentKernel
- structs: AUBParentKernelFixture, MockParentKernel,
ParentKernelCommandQueueFixture

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2022-01-17 13:56:29 +01:00

42 lines
1.1 KiB
C++

/*
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/source/helpers/dispatch_info.h"
#include "opencl/source/kernel/kernel.h"
namespace NEO {
bool DispatchInfo::usesSlm() const {
return (kernel == nullptr) ? false : kernel->getSlmTotalSize() > 0;
}
bool DispatchInfo::usesStatelessPrintfSurface() const {
return (kernel == nullptr) ? false : kernel->hasPrintfOutput();
}
uint32_t DispatchInfo::getRequiredScratchSize() const {
return (kernel == nullptr) ? 0 : kernel->getScratchSize();
}
uint32_t DispatchInfo::getRequiredPrivateScratchSize() const {
return (kernel == nullptr) ? 0 : kernel->getPrivateScratchSize();
}
Kernel *MultiDispatchInfo::peekMainKernel() const {
if (dispatchInfos.size() == 0) {
return nullptr;
}
return mainKernel ? mainKernel : dispatchInfos.begin()->getKernel();
}
void MultiDispatchInfo::backupUnifiedMemorySyncRequirement() {
for (const auto &dispatchInfo : dispatchInfos) {
dispatchInfo.getKernel()->setUnifiedMemorySyncRequirement(true);
}
}
} // namespace NEO