Dont pass device to Kernel's ctor

Kernel should reuse devices from program

Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-11-12 16:31:22 +01:00
committed by Compute-Runtime-Automation
parent 8323ddbb3b
commit a1b5d5a335
42 changed files with 254 additions and 262 deletions

View File

@@ -43,8 +43,8 @@ void SchedulerKernel::setArgs(GraphicsAllocation *queue,
" \nkrs=", reflectionSurface->getUnderlyingBuffer(), " \nstorage=", queueStorageBuffer->getUnderlyingBuffer(), "\nssh=", ssh->getUnderlyingBuffer());
}
void SchedulerKernel::computeGws() {
auto &devInfo = device.getDeviceInfo();
auto &hwInfo = device.getHardwareInfo();
auto &devInfo = getDevice().getDeviceInfo();
auto &hwInfo = getDevice().getHardwareInfo();
auto &helper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
size_t hWThreadsPerSubSlice = devInfo.maxComputUnits / hwInfo.gtSystemInfo.SubSliceCount;
@@ -53,7 +53,7 @@ void SchedulerKernel::computeGws() {
wkgsPerSubSlice = std::min(wkgsPerSubSlice, helper.getMaxBarrierRegisterPerSlice());
gws = wkgsPerSubSlice * hwInfo.gtSystemInfo.SubSliceCount * PARALLEL_SCHEDULER_HWTHREADS_IN_HW_GROUP20 * PARALLEL_SCHEDULER_COMPILATION_SIZE_20;
if (device.isSimulation()) {
if (getDevice().isSimulation()) {
gws = PARALLEL_SCHEDULER_HWTHREADS_IN_HW_GROUP20 * PARALLEL_SCHEDULER_COMPILATION_SIZE_20;
}
if (DebugManager.flags.SchedulerGWS.get() != 0) {

View File

@@ -55,13 +55,13 @@ class SchedulerKernel : public Kernel {
static BuiltinCode loadSchedulerKernel(Device *device);
protected:
SchedulerKernel(Program *programArg, const KernelInfo &kernelInfoArg, const ClDevice &deviceArg) : Kernel(programArg, kernelInfoArg, deviceArg, true), gws(0) {
SchedulerKernel(Program *programArg, const KernelInfo &kernelInfoArg) : Kernel(programArg, kernelInfoArg, true) {
computeGws();
};
void computeGws();
size_t gws;
size_t gws = 0u;
};
} // namespace NEO