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
  clGetPlatformIDs API call, and if yes,
  make a call to OpenGTPinOCL function.
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
Kacper Nowak
2023-08-02 19:33:48 +02:00
committed by Compute-Runtime-Automation
parent 05fb8e9c00
commit 68a5108e05
18 changed files with 162 additions and 106 deletions

View File

@@ -0,0 +1,13 @@
#
# Copyright (C) 2020-2023 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
if(UNIX)
list(APPEND NEO_GTPIN
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/os_pin.h
)
include_directories(${NEO_SHARED_DIRECTORY}/pin/)
endif()

View File

@@ -0,0 +1,15 @@
/*
* Copyright (C) 2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/pin/pin.h"
namespace NEO {
typedef uint32_t (*OpenGTPin_fn)(void *gtPinInit);
const std::string PinContext::gtPinLibraryFilename = "libgtpin.so";
} // namespace NEO