Skip to content

Commit 204dbba

Browse files
Rogersypjfedorovmschilling0Copilot
authored
[PTI-LIB] Multi-threaded PTI Metrics Library Support (PTI-145, PTI-335)
- Added multi-thread support to PTI metrics library with thread-safe implementation - Redesigned PtiMetricsCollectorHandler by simplifying getters to be lock-free and const - Implemented string storage/pool class for efficient string management across threads - Added performance tests including overhead testing and multi-threaded functional tests - Addressed code review feedback including Copilot suggestions and peer review comments Signed-off-by: Yipeng Song <[email protected]> Co-authored-by: Julia Fedorova <[email protected]> Co-authored-by: Schilling, Matthew <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 587edc7 commit 204dbba

File tree

9 files changed

+1889
-315
lines changed

9 files changed

+1889
-315
lines changed

sdk/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ if(BUILD_TESTING AND PTI_BUILD_SAMPLES)
277277
add_subdirectory(samples/callback)
278278
add_subdirectory(samples/metrics_scope)
279279
add_subdirectory(samples/omp_vec_add)
280+
add_subdirectory(samples/metrics_perf)
280281
endif()
281282

282283
if(BUILD_TESTING AND PTI_BUILD_TESTING)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
3+
project(PTI_Samples_METRICS_PERF CXX)
4+
5+
if(NOT CMAKE_BUILD_TYPE)
6+
set(CMAKE_BUILD_TYPE "Release")
7+
endif()
8+
9+
include(CheckCXXCompilerFlag)
10+
check_cxx_compiler_flag("-fsycl" has_sycl)
11+
12+
if(NOT has_sycl)
13+
message(WARNING "${PROJECT_NAME} requires a sycl compatible compiler")
14+
return()
15+
endif()
16+
17+
add_executable(metrics_perf metrics_perf.cc)
18+
19+
target_link_options(metrics_perf PUBLIC -fsycl)
20+
target_compile_options(metrics_perf PUBLIC -fsycl)
21+
target_include_directories(metrics_perf
22+
PRIVATE "${PROJECT_SOURCE_DIR}/../samples_utilities")
23+
24+
if (NOT TARGET Pti::pti_view)
25+
find_package(Pti REQUIRED)
26+
endif()
27+
28+
target_link_libraries(metrics_perf PUBLIC Pti::pti_view LevelZero::level-zero)
29+

0 commit comments

Comments
 (0)