Skip to content

Commit

Permalink
Update cmake and fix typo
Browse files Browse the repository at this point in the history
Add compile time macro and also fix typos in ur_lib.hpp.
  • Loading branch information
hdelan committed Oct 21, 2024
1 parent bd793ef commit 375ab46
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,18 @@ else()
endif()
endif()

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

if(UR_USE_ASAN)
add_sanitizer_flag(address)
endif()
Expand Down
5 changes: 3 additions & 2 deletions source/loader/layers/exception_sanitizer/ur_exceptionddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4898,8 +4898,9 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
phEvent, ///< [out][optional] return an event object that will be signaled by the
///< completion of this command in the next execution of the
///< command-buffer.
ur_exp_command_buffer_command_handle_t
*phCommand ///< [out][optional] Handle to this command.
ur_exp_command_buffer_command_handle_t *
phCommand ///< [out][optional] Handle to this command. Only available if the
///< command-buffer is updatable.
) {
auto pfnAppendKernelLaunchExp =
getContext()->urDdiTable.CommandBufferExp.pfnAppendKernelLaunchExp;
Expand Down
4 changes: 2 additions & 2 deletions source/loader/ur_lib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "sanitizer/ur_sanitizer_layer.hpp"
#endif
#if UR_ENABLE_EXCEPTION_SANITIZER
#include "exception-sanitizer/ur_exception_sanitizer_layer.hpp"
#include "exception_sanitizer/ur_exception_sanitizer_layer.hpp"
#endif

#include <atomic>
Expand Down Expand Up @@ -89,7 +89,7 @@ class __urdlllocal context_t : public AtomicSingleton<context_t> {
#endif
#if UR_ENABLE_EXCEPTION_SANITIZER
{ur_exception_sanitizer_layer::getContext(),
ur_exception_sanitizer_layer::forceDelete},
ur_exception_sanitizer_layer::context_t::forceDelete},
#endif
};

Expand Down

0 comments on commit 375ab46

Please sign in to comment.