mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +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
@@ -80,9 +80,7 @@ class Kernel : public BaseObject<_cl_kernel> {
|
||||
cl_int retVal;
|
||||
kernel_t *pKernel = nullptr;
|
||||
|
||||
auto clDevice = program->getDevices()[0];
|
||||
|
||||
pKernel = new kernel_t(program, kernelInfo, *clDevice);
|
||||
pKernel = new kernel_t(program, kernelInfo);
|
||||
retVal = pKernel->initialize();
|
||||
|
||||
if (retVal != CL_SUCCESS) {
|
||||
@@ -191,7 +189,7 @@ class Kernel : public BaseObject<_cl_kernel> {
|
||||
}
|
||||
|
||||
const ClDevice &getDevice() const {
|
||||
return device;
|
||||
return *deviceVector[0];
|
||||
}
|
||||
|
||||
Context &getContext() const {
|
||||
@@ -501,7 +499,7 @@ class Kernel : public BaseObject<_cl_kernel> {
|
||||
void patchWithImplicitSurface(void *ptrToPatchInCrossThreadData, GraphicsAllocation &allocation, const PatchTokenT &patch);
|
||||
|
||||
void getParentObjectCounts(ObjectCounts &objectCount);
|
||||
Kernel(Program *programArg, const KernelInfo &kernelInfoArg, const ClDevice &deviceArg, bool schedulerKernel = false);
|
||||
Kernel(Program *programArg, const KernelInfo &kernelInfoArg, bool schedulerKernel = false);
|
||||
void provideInitializationHints();
|
||||
|
||||
void patchBlocksCurbeWithConstantValues();
|
||||
@@ -514,7 +512,7 @@ class Kernel : public BaseObject<_cl_kernel> {
|
||||
bool allocationForCacheFlush(GraphicsAllocation *argAllocation) const;
|
||||
Program *program;
|
||||
Context *context = nullptr;
|
||||
const ClDevice &device;
|
||||
const ClDeviceVector &deviceVector;
|
||||
const KernelInfo &kernelInfo;
|
||||
|
||||
std::vector<SimpleKernelArgInfo> kernelArguments;
|
||||
|
||||
Reference in New Issue
Block a user