diff --git a/BUILD.bazel b/BUILD.bazel index 02897a085da..9e052eb3350 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -4734,8 +4734,8 @@ xnnpack_cc_library( defines = select({ # No logging in optimized mode ":optimized_build": ["XNN_LOG_LEVEL=0"], - # Full logging in debug mode - ":debug_build": ["XNN_LOG_LEVEL=5"], + # Info logging in debug mode. Use `--define=xnn_log_level=debug` for full logging. + ":debug_build": ["XNN_LOG_LEVEL=4"], # Error-only logging in default (fastbuild) mode "//conditions:default": ["XNN_LOG_LEVEL=2"], }), diff --git a/CMakeLists.txt b/CMakeLists.txt index dae85841313..868fc9c74f3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -719,21 +719,21 @@ IF(XNNPACK_TARGET_PROCESSOR MATCHES "^x86(_64)?$") ENDIF() ENDIF() ENDIF() -TARGET_COMPILE_DEFINITIONS(hardware-config PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") -TARGET_COMPILE_DEFINITIONS(jit PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") -TARGET_COMPILE_DEFINITIONS(logging PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") +TARGET_COMPILE_DEFINITIONS(hardware-config PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") +TARGET_COMPILE_DEFINITIONS(jit PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") +TARGET_COMPILE_DEFINITIONS(logging PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") IF(XNNPACK_BUILD_LIBRARY) - TARGET_COMPILE_DEFINITIONS(XNNPACK PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") - TARGET_COMPILE_DEFINITIONS(allocator PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") - TARGET_COMPILE_DEFINITIONS(cache PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") - TARGET_COMPILE_DEFINITIONS(microkernel-utils PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") - TARGET_COMPILE_DEFINITIONS(subgraph PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") - TARGET_COMPILE_DEFINITIONS(operators PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") - TARGET_COMPILE_DEFINITIONS(operator-run PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") - TARGET_COMPILE_DEFINITIONS(operator-utils PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") - TARGET_COMPILE_DEFINITIONS(packing PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") - TARGET_COMPILE_DEFINITIONS(mutex PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") - TARGET_COMPILE_DEFINITIONS(memory PRIVATE "XNN_LOG_LEVEL=$<$:5>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(XNNPACK PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(allocator PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(cache PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(microkernel-utils PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(subgraph PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(operators PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(operator-run PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(operator-utils PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(packing PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(mutex PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") + TARGET_COMPILE_DEFINITIONS(memory PRIVATE "XNN_LOG_LEVEL=$<$:4>$<$>:0>") ENDIF() IF(MSVC) # Even though MSVC has __restrict, it can't be used in all the same contexts as the C99 restrict keyword