mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Reuse builtin module and init selected builtin on device init
-start async thread at device initialization which initializes selected builtins and exits -share module across builtins using same binary Resolves: NEO-7644 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
72f33b898d
commit
e6181d7933
@@ -5,7 +5,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/driver_model_type.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
|
||||
#include "level_zero/core/source/builtin/builtin_functions_lib_impl.h"
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
@@ -14,4 +21,10 @@ std::unique_ptr<BuiltinFunctionsLib> BuiltinFunctionsLib::create(Device *device,
|
||||
return std::unique_ptr<BuiltinFunctionsLib>(new BuiltinFunctionsLibImpl(device, builtins));
|
||||
}
|
||||
|
||||
bool BuiltinFunctionsLibImpl::initBuiltinsAsyncEnabled(Device *device) {
|
||||
return device->getNEODevice()->getRootDeviceEnvironment().osInterface.get() &&
|
||||
device->getNEODevice()->getRootDeviceEnvironment().osInterface->getDriverModel()->getDriverModelType() == NEO::DriverModelType::DRM &&
|
||||
device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getType() == NEO::CommandStreamReceiverType::CSR_HW;
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user