mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-01 12:33:12 +08:00
Change-Id: Id2af09190edbc1a3bb930210fe340691aa1e4578 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
36 lines
1.2 KiB
C++
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
|