2019-09-30 11:20:16 +02:00
|
|
|
/*
|
2023-04-27 08:42:36 +00:00
|
|
|
* Copyright (C) 2020-2023 Intel Corporation
|
2019-09-30 11:20:16 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-10-22 12:14:54 +02:00
|
|
|
#include "opencl/source/cl_device/cl_device.h"
|
|
|
|
|
|
2019-09-30 11:20:16 +02:00
|
|
|
namespace NEO {
|
|
|
|
|
template <typename... KernelsDescArgsT>
|
2021-03-15 11:39:58 +00:00
|
|
|
void BuiltinDispatchInfoBuilder::populate(EBuiltInOps::Type op, ConstStringRef options, KernelsDescArgsT &&...desc) {
|
2023-12-13 16:09:52 +00:00
|
|
|
auto src = kernelsLib.getBuiltinsLib().getBuiltinCode(op, BuiltinCode::ECodeType::any, clDevice.getDevice());
|
2020-10-22 12:14:54 +02:00
|
|
|
ClDeviceVector deviceVector;
|
2020-11-16 12:08:30 +01:00
|
|
|
deviceVector.push_back(&clDevice);
|
2020-10-22 12:14:54 +02:00
|
|
|
prog.reset(BuiltinDispatchInfoBuilder::createProgramFromCode(src, deviceVector).release());
|
2023-04-27 08:42:36 +00:00
|
|
|
prog->build(deviceVector, options.data());
|
2019-09-30 11:20:16 +02:00
|
|
|
grabKernels(std::forward<KernelsDescArgsT>(desc)...);
|
|
|
|
|
}
|
|
|
|
|
} // namespace NEO
|