Skip to content

Commit 49a5dfa

Browse files
EgorDuplenskyazhai219
authored andcommitted
[FIX] Add option to explicitly disable XBYAK_NO_EXCEPTION
1 parent fae63f0 commit 49a5dfa

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

cmake/options.cmake

+3
Original file line numberDiff line numberDiff line change
@@ -424,3 +424,6 @@ option(DNNL_AARCH64_USE_ACL "Enables use of AArch64 optimised functions
424424
This is only supported on AArch64 builds and assumes there is a
425425
functioning Compute Library build available at the location specified by the
426426
environment variable ACL_ROOT_DIR." OFF)
427+
428+
option(DNNL_XBYAK_NO_EXCEPTION
429+
"Enables XBYAK_NO_EXCEPTION" ON) # enabled by default

src/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ if(UNIX)
123123
endif()
124124
endif()
125125

126+
if(DNNL_XBYAK_NO_EXCEPTION)
127+
add_definitions_with_host_compiler(-DDNNL_XBYAK_NO_EXCEPTION)
128+
endif()
129+
126130
macro(enable_conditional_compilation4 target)
127131
if(COMMAND ov_mark_target_as_cc)
128132
ov_mark_target_as_cc(${target})

src/cpu/x64/cpu_isa_traits.hpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@
3333
/* in order to make selinux happy memory that would be marked with X-bit should
3434
* be obtained with mmap */
3535
// #define XBYAK_USE_MMAP_ALLOCATOR
36-
#if !defined(DNNL_ENABLE_EXCEPTIONS) && defined(NDEBUG)
36+
37+
// Overwrite ONEDNN XBYAK_NO_EXCEPTION definition.
38+
// #define XBYAK_NO_EXCEPTION
39+
// #ifndef NDEBUG
40+
// #undef XBYAK_NO_EXCEPTION
41+
// #endif
42+
#ifdef DNNL_XBYAK_NO_EXCEPTION
3743
#define XBYAK_NO_EXCEPTION
3844
#endif
39-
4045
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
4146
/* turn off `size_t to other-type implicit casting` warning
4247
* currently we have a lot of jit-generated instructions that

0 commit comments

Comments
 (0)