mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
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:
committed by
Compute-Runtime-Automation
parent
8323ddbb3b
commit
a1b5d5a335
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user