Remove device enqueue part 5

-remove scheduler and builtin_kernels_simulation

Related-To: NEO-6559
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2022-01-13 11:27:41 +00:00
committed by Compute-Runtime-Automation
parent 86161a8a4f
commit d2818aaea2
30 changed files with 13 additions and 4849 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -27,7 +27,6 @@
#include "opencl/source/helpers/surface_formats.h"
#include "opencl/source/mem_obj/image.h"
#include "opencl/source/platform/platform.h"
#include "opencl/source/scheduler/scheduler_kernel.h"
#include "opencl/source/sharings/sharing.h"
#include "opencl/source/sharings/sharing_factory.h"
@@ -44,7 +43,6 @@ Context::Context(
contextCallback = funcNotify;
userData = data;
sharingFunctions.resize(SharingType::MAX_SHARING_VALUE);
schedulerBuiltIn = std::make_unique<BuiltInKernel>();
}
Context::~Context() {
@@ -69,10 +67,6 @@ Context::~Context() {
for (auto &device : devices) {
device->decRefInternal();
}
delete static_cast<SchedulerKernel *>(schedulerBuiltIn->pKernel);
delete schedulerBuiltIn->pProgram;
schedulerBuiltIn->pKernel = nullptr;
schedulerBuiltIn->pProgram = nullptr;
}
cl_int Context::setDestructorCallback(void(CL_CALLBACK *funcNotify)(cl_context, void *),
@@ -414,48 +408,6 @@ cl_int Context::getSupportedImageFormats(
return CL_SUCCESS;
}
SchedulerKernel &Context::getSchedulerKernel() {
if (schedulerBuiltIn->pKernel) {
return *static_cast<SchedulerKernel *>(schedulerBuiltIn->pKernel);
}
auto initializeSchedulerProgramAndKernel = [&] {
cl_int retVal = CL_SUCCESS;
auto clDevice = getDevice(0);
auto src = SchedulerKernel::loadSchedulerKernel(&clDevice->getDevice());
auto program = Program::createBuiltInFromGenBinary(this,
devices,
src.resource.data(),
src.resource.size(),
&retVal);
DEBUG_BREAK_IF(retVal != CL_SUCCESS);
DEBUG_BREAK_IF(!program);
retVal = program->processGenBinary(*clDevice);
DEBUG_BREAK_IF(retVal != CL_SUCCESS);
schedulerBuiltIn->pProgram = program;
auto kernelInfo = schedulerBuiltIn->pProgram->getKernelInfo(SchedulerKernel::schedulerName, clDevice->getRootDeviceIndex());
DEBUG_BREAK_IF(!kernelInfo);
schedulerBuiltIn->pKernel = Kernel::create<SchedulerKernel>(
schedulerBuiltIn->pProgram,
*kernelInfo,
*clDevice,
&retVal);
UNRECOVERABLE_IF(schedulerBuiltIn->pKernel->getScratchSize() != 0);
DEBUG_BREAK_IF(retVal != CL_SUCCESS);
};
std::call_once(schedulerBuiltIn->programIsInitialized, initializeSchedulerProgramAndKernel);
UNRECOVERABLE_IF(schedulerBuiltIn->pKernel == nullptr);
return *static_cast<SchedulerKernel *>(schedulerBuiltIn->pKernel);
}
bool Context::isDeviceAssociated(const ClDevice &clDevice) const {
for (const auto &pDevice : devices) {
if (pDevice == &clDevice) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -35,7 +35,6 @@ class MemObj;
class MemoryManager;
class SharingFunctions;
class SVMAllocsManager;
class SchedulerKernel;
class Program;
class Platform;
@@ -167,8 +166,6 @@ class Context : public BaseObject<_cl_context> {
ContextType peekContextType() const { return contextType; }
MOCKABLE_VIRTUAL SchedulerKernel &getSchedulerKernel();
bool isDeviceAssociated(const ClDevice &clDevice) const;
ClDevice *getSubDeviceByIndex(uint32_t subDeviceIndex) const;
@@ -212,7 +209,6 @@ class Context : public BaseObject<_cl_context> {
std::vector<std::unique_ptr<SharingFunctions>> sharingFunctions;
ClDeviceVector devices;
ContextDestructorCallbacks destructorCallbacks;
std::unique_ptr<BuiltInKernel> schedulerBuiltIn;
const cl_context_properties *properties = nullptr;
size_t numProperties = 0u;