Files
compute-runtime/runtime/helpers/built_ins_helper.cpp
Filip Hazubski 8fcff2241f Add ClDevice
Decouple cl_device_id from Device class.

Related-To: NEO-3938

Change-Id: I68543a753aea562f3b47ba0d23a059ff3cffa906
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-01-17 12:43:11 +01:00

34 lines
1.1 KiB
C++

/*
* Copyright (C) 2018-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/built_ins_helper.h"
#include "runtime/device/device.h"
#include "runtime/program/program.h"
namespace NEO {
const SipKernel &initSipKernel(SipKernelType type, ClDevice &device) {
return device.getExecutionEnvironment()->getBuiltIns()->getSipKernel(type, device.getDevice());
}
Program *createProgramForSip(ExecutionEnvironment &executionEnvironment,
Context *context,
std::vector<char> &binary,
size_t size,
cl_int *errcodeRet) {
cl_int retVal = 0;
auto program = Program::createFromGenBinary(executionEnvironment,
nullptr,
binary.data(),
size,
true,
&retVal);
DEBUG_BREAK_IF(retVal != 0);
return program;
}
} // namespace NEO