mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
refactor: Unify GTPin initialization logic between APIs
Add support for new GTPin loading logic in OCL path, similar to existing in L0 - invoking exposed, dedicated API call (OpenGTPinOCL). - Move logic to shared, including unit tests - Check whether instrumentation is required on context creation and if yes, make a call to OpenGTPinOCL function. Handle potential errors gracefully without exiting. Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c43b827702
commit
1afaf37f78
@@ -21,6 +21,7 @@
|
||||
#include "opencl/source/kernel/kernel.h"
|
||||
#include "opencl/source/kernel/multi_device_kernel.h"
|
||||
#include "opencl/source/mem_obj/buffer.h"
|
||||
#include "opencl/source/platform/platform.h"
|
||||
#include "opencl/source/program/program.h"
|
||||
|
||||
#include "CL/cl.h"
|
||||
@@ -281,4 +282,12 @@ void gtpinRemoveCommandQueue(void *pCmdQueue) {
|
||||
}
|
||||
}
|
||||
|
||||
void gtPinTryNotifyInit() {
|
||||
if (platformsImpl->empty()) {
|
||||
return;
|
||||
}
|
||||
auto &pPlatform = *(*platformsImpl)[0];
|
||||
pPlatform.tryNotifyGtpinInit();
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
||||
@@ -28,4 +28,6 @@ inline bool gtpinIsGTPinInitialized() { return isGTPinInitialized; }
|
||||
void *gtpinGetIgcInit();
|
||||
void gtpinSetIgcInit(void *pIgcInitPtr);
|
||||
void gtpinRemoveCommandQueue(void *pCmdQueue);
|
||||
|
||||
void gtPinTryNotifyInit();
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user