Files
compute-runtime/runtime/helpers/built_ins_helper.cpp
Maciej Plewka b218281488 Dont use context in built ins
Change-Id: Id2af09190edbc1a3bb930210fe340691aa1e4578
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2020-02-20 17:20:18 +01:00

36 lines
1.2 KiB
C++

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