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
13
shared/source/pin/windows/CMakeLists.txt
Normal file
13
shared/source/pin/windows/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND NEO_GTPIN
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/os_pin.h
|
||||
)
|
||||
include_directories(${NEO_SHARED_DIRECTORY}/pin/)
|
||||
endif()
|
||||
15
shared/source/pin/windows/os_pin.h
Normal file
15
shared/source/pin/windows/os_pin.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/pin/pin.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef uint32_t(__fastcall *OpenGTPin_fn)(void *gtPinInit);
|
||||
const std::string PinContext::gtPinLibraryFilename = "gtpin.dll";
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user