Skip to content

Commit

Permalink
Merge pull request #1210 from AllanZyne/sanitizer-pr-cpu-local
Browse files Browse the repository at this point in the history
[DeviceSanitizer] Support detecting out-of-bounds error on CPU Device & Static Local Memory
  • Loading branch information
pbalcer authored Feb 1, 2024
2 parents 5d5c810 + 0631330 commit c6b0a24
Show file tree
Hide file tree
Showing 7 changed files with 401 additions and 76 deletions.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,15 @@ if(UR_ENABLE_TRACING)
endif()

if(UR_ENABLE_SANITIZER)
add_compile_definitions(UR_ENABLE_SANITIZER)
if(APPLE)
message(WARNING "Sanitizer layer isn't supported on macOS")
set(UR_ENABLE_SANITIZER OFF)
elseif(WIN32)
message(WARNING "Sanitizer layer isn't supported on Windows")
set(UR_ENABLE_SANITIZER OFF)
else()
add_compile_definitions(UR_ENABLE_SANITIZER)
endif()
endif()

if(UR_USE_ASAN)
Expand Down
7 changes: 7 additions & 0 deletions source/loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,14 @@ if(UR_ENABLE_SANITIZER)
${CMAKE_CURRENT_SOURCE_DIR}/layers/sanitizer/ur_sanitizer_layer.hpp
${CMAKE_CURRENT_SOURCE_DIR}/layers/sanitizer/ur_sanddi.cpp
)

target_sources(ur_loader
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/layers/sanitizer/linux/san_utils.cpp
)

target_include_directories(ur_loader PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/layers/sanitizer"
"${CMAKE_CURRENT_SOURCE_DIR}/../"
)
endif()
Expand Down
Loading

0 comments on commit c6b0a24

Please sign in to comment.