diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2d9fc950b7a..e2f29bc3b4d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ #=============================================================================== -# Copyright 2016-2024 Intel Corporation +# Copyright 2016-2025 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ file(GLOB HEADERS_SUBDIR ${CMAKE_CURRENT_SOURCE_DIR}/../include/oneapi/dnnl/*.h ${CMAKE_CURRENT_SOURCE_DIR}/../include/oneapi/dnnl/*.hpp ) +include_directories_with_host_compiler(${PROJECT_SOURCE_DIR}/third_party) include_directories_with_host_compiler(${CMAKE_CURRENT_SOURCE_DIR}) if (DNNL_LIBRARY_TYPE STREQUAL "SHARED") diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 34f9335104c..33f4800c5df 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -1,5 +1,5 @@ #=============================================================================== -# Copyright 2019-2024 Intel Corporation +# Copyright 2019-2025 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,13 +48,8 @@ if(NOT DNNL_CPU_RUNTIME STREQUAL "THREADPOOL") list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/stream_threadpool.cpp") endif() -if(DNNL_EXPERIMENTAL_LOGGING) - include_directories(${CMAKE_CURRENT_LIST_DIR}) -else() - # avoid building and linking spdlog if logging support is not enabled - list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/spdlog/*") +if(NOT DNNL_EXPERIMENTAL_LOGGING) list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/logging.cpp") - list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/logging.hpp") endif() set(OBJ_LIB ${LIB_PACKAGE_NAME}_common) diff --git a/src/common/logging.cpp b/src/common/logging.cpp index 295d20b106f..9ebcc72d133 100644 --- a/src/common/logging.cpp +++ b/src/common/logging.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright 2024 Intel Corporation +* Copyright 2024-2025 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ #include "common/logging.hpp" #include "common/utils.hpp" -#include "common/spdlog/sinks/rotating_file_sink.h" -#include "common/spdlog/spdlog.h" +#include "spdlog/sinks/rotating_file_sink.h" +#include "spdlog/spdlog.h" namespace dnnl { namespace impl { diff --git a/src/common/spdlog/.clang-format b/src/common/spdlog/.clang-format deleted file mode 100644 index 068185552a0..00000000000 --- a/src/common/spdlog/.clang-format +++ /dev/null @@ -1,18 +0,0 @@ -#=============================================================================== -# Copyright 2019-2020 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#=============================================================================== - -DisableFormat : true -SortIncludes: false diff --git a/src/common/spdlog/README.md b/third_party/spdlog/README.md similarity index 100% rename from src/common/spdlog/README.md rename to third_party/spdlog/README.md diff --git a/src/common/spdlog/common-inl.h b/third_party/spdlog/common-inl.h similarity index 100% rename from src/common/spdlog/common-inl.h rename to third_party/spdlog/common-inl.h diff --git a/src/common/spdlog/common.h b/third_party/spdlog/common.h similarity index 100% rename from src/common/spdlog/common.h rename to third_party/spdlog/common.h diff --git a/src/common/spdlog/details/backtracer-inl.h b/third_party/spdlog/details/backtracer-inl.h similarity index 100% rename from src/common/spdlog/details/backtracer-inl.h rename to third_party/spdlog/details/backtracer-inl.h diff --git a/src/common/spdlog/details/backtracer.h b/third_party/spdlog/details/backtracer.h similarity index 100% rename from src/common/spdlog/details/backtracer.h rename to third_party/spdlog/details/backtracer.h diff --git a/src/common/spdlog/details/circular_q.h b/third_party/spdlog/details/circular_q.h similarity index 100% rename from src/common/spdlog/details/circular_q.h rename to third_party/spdlog/details/circular_q.h diff --git a/src/common/spdlog/details/console_globals.h b/third_party/spdlog/details/console_globals.h similarity index 100% rename from src/common/spdlog/details/console_globals.h rename to third_party/spdlog/details/console_globals.h diff --git a/src/common/spdlog/details/file_helper-inl.h b/third_party/spdlog/details/file_helper-inl.h similarity index 100% rename from src/common/spdlog/details/file_helper-inl.h rename to third_party/spdlog/details/file_helper-inl.h diff --git a/src/common/spdlog/details/file_helper.h b/third_party/spdlog/details/file_helper.h similarity index 100% rename from src/common/spdlog/details/file_helper.h rename to third_party/spdlog/details/file_helper.h diff --git a/src/common/spdlog/details/fmt_helper.h b/third_party/spdlog/details/fmt_helper.h similarity index 100% rename from src/common/spdlog/details/fmt_helper.h rename to third_party/spdlog/details/fmt_helper.h diff --git a/src/common/spdlog/details/log_msg-inl.h b/third_party/spdlog/details/log_msg-inl.h similarity index 100% rename from src/common/spdlog/details/log_msg-inl.h rename to third_party/spdlog/details/log_msg-inl.h diff --git a/src/common/spdlog/details/log_msg.h b/third_party/spdlog/details/log_msg.h similarity index 100% rename from src/common/spdlog/details/log_msg.h rename to third_party/spdlog/details/log_msg.h diff --git a/src/common/spdlog/details/log_msg_buffer-inl.h b/third_party/spdlog/details/log_msg_buffer-inl.h similarity index 100% rename from src/common/spdlog/details/log_msg_buffer-inl.h rename to third_party/spdlog/details/log_msg_buffer-inl.h diff --git a/src/common/spdlog/details/log_msg_buffer.h b/third_party/spdlog/details/log_msg_buffer.h similarity index 100% rename from src/common/spdlog/details/log_msg_buffer.h rename to third_party/spdlog/details/log_msg_buffer.h diff --git a/src/common/spdlog/details/null_mutex.h b/third_party/spdlog/details/null_mutex.h similarity index 100% rename from src/common/spdlog/details/null_mutex.h rename to third_party/spdlog/details/null_mutex.h diff --git a/src/common/spdlog/details/os-inl.h b/third_party/spdlog/details/os-inl.h similarity index 100% rename from src/common/spdlog/details/os-inl.h rename to third_party/spdlog/details/os-inl.h diff --git a/src/common/spdlog/details/os.h b/third_party/spdlog/details/os.h similarity index 100% rename from src/common/spdlog/details/os.h rename to third_party/spdlog/details/os.h diff --git a/src/common/spdlog/details/periodic_worker-inl.h b/third_party/spdlog/details/periodic_worker-inl.h similarity index 100% rename from src/common/spdlog/details/periodic_worker-inl.h rename to third_party/spdlog/details/periodic_worker-inl.h diff --git a/src/common/spdlog/details/periodic_worker.h b/third_party/spdlog/details/periodic_worker.h similarity index 100% rename from src/common/spdlog/details/periodic_worker.h rename to third_party/spdlog/details/periodic_worker.h diff --git a/src/common/spdlog/details/registry-inl.h b/third_party/spdlog/details/registry-inl.h similarity index 100% rename from src/common/spdlog/details/registry-inl.h rename to third_party/spdlog/details/registry-inl.h diff --git a/src/common/spdlog/details/registry.h b/third_party/spdlog/details/registry.h similarity index 100% rename from src/common/spdlog/details/registry.h rename to third_party/spdlog/details/registry.h diff --git a/src/common/spdlog/details/synchronous_factory.h b/third_party/spdlog/details/synchronous_factory.h similarity index 100% rename from src/common/spdlog/details/synchronous_factory.h rename to third_party/spdlog/details/synchronous_factory.h diff --git a/src/common/spdlog/details/windows_include.h b/third_party/spdlog/details/windows_include.h similarity index 100% rename from src/common/spdlog/details/windows_include.h rename to third_party/spdlog/details/windows_include.h diff --git a/src/common/spdlog/fmt/bundled/base.h b/third_party/spdlog/fmt/bundled/base.h similarity index 100% rename from src/common/spdlog/fmt/bundled/base.h rename to third_party/spdlog/fmt/bundled/base.h diff --git a/src/common/spdlog/fmt/bundled/core.h b/third_party/spdlog/fmt/bundled/core.h similarity index 100% rename from src/common/spdlog/fmt/bundled/core.h rename to third_party/spdlog/fmt/bundled/core.h diff --git a/src/common/spdlog/fmt/bundled/format-inl.h b/third_party/spdlog/fmt/bundled/format-inl.h similarity index 100% rename from src/common/spdlog/fmt/bundled/format-inl.h rename to third_party/spdlog/fmt/bundled/format-inl.h diff --git a/src/common/spdlog/fmt/bundled/format.h b/third_party/spdlog/fmt/bundled/format.h similarity index 100% rename from src/common/spdlog/fmt/bundled/format.h rename to third_party/spdlog/fmt/bundled/format.h diff --git a/src/common/spdlog/fmt/fmt.h b/third_party/spdlog/fmt/fmt.h similarity index 100% rename from src/common/spdlog/fmt/fmt.h rename to third_party/spdlog/fmt/fmt.h diff --git a/src/common/spdlog/formatter.h b/third_party/spdlog/formatter.h similarity index 100% rename from src/common/spdlog/formatter.h rename to third_party/spdlog/formatter.h diff --git a/src/common/spdlog/logger-inl.h b/third_party/spdlog/logger-inl.h similarity index 100% rename from src/common/spdlog/logger-inl.h rename to third_party/spdlog/logger-inl.h diff --git a/src/common/spdlog/logger.h b/third_party/spdlog/logger.h similarity index 100% rename from src/common/spdlog/logger.h rename to third_party/spdlog/logger.h diff --git a/src/common/spdlog/mdc.h b/third_party/spdlog/mdc.h similarity index 100% rename from src/common/spdlog/mdc.h rename to third_party/spdlog/mdc.h diff --git a/src/common/spdlog/pattern_formatter-inl.h b/third_party/spdlog/pattern_formatter-inl.h similarity index 100% rename from src/common/spdlog/pattern_formatter-inl.h rename to third_party/spdlog/pattern_formatter-inl.h diff --git a/src/common/spdlog/pattern_formatter.h b/third_party/spdlog/pattern_formatter.h similarity index 100% rename from src/common/spdlog/pattern_formatter.h rename to third_party/spdlog/pattern_formatter.h diff --git a/src/common/spdlog/sinks/ansicolor_sink-inl.h b/third_party/spdlog/sinks/ansicolor_sink-inl.h similarity index 100% rename from src/common/spdlog/sinks/ansicolor_sink-inl.h rename to third_party/spdlog/sinks/ansicolor_sink-inl.h diff --git a/src/common/spdlog/sinks/ansicolor_sink.h b/third_party/spdlog/sinks/ansicolor_sink.h similarity index 100% rename from src/common/spdlog/sinks/ansicolor_sink.h rename to third_party/spdlog/sinks/ansicolor_sink.h diff --git a/src/common/spdlog/sinks/base_sink-inl.h b/third_party/spdlog/sinks/base_sink-inl.h similarity index 100% rename from src/common/spdlog/sinks/base_sink-inl.h rename to third_party/spdlog/sinks/base_sink-inl.h diff --git a/src/common/spdlog/sinks/base_sink.h b/third_party/spdlog/sinks/base_sink.h similarity index 100% rename from src/common/spdlog/sinks/base_sink.h rename to third_party/spdlog/sinks/base_sink.h diff --git a/src/common/spdlog/sinks/basic_file_sink-inl.h b/third_party/spdlog/sinks/basic_file_sink-inl.h similarity index 100% rename from src/common/spdlog/sinks/basic_file_sink-inl.h rename to third_party/spdlog/sinks/basic_file_sink-inl.h diff --git a/src/common/spdlog/sinks/basic_file_sink.h b/third_party/spdlog/sinks/basic_file_sink.h similarity index 100% rename from src/common/spdlog/sinks/basic_file_sink.h rename to third_party/spdlog/sinks/basic_file_sink.h diff --git a/src/common/spdlog/sinks/null_sink.h b/third_party/spdlog/sinks/null_sink.h similarity index 100% rename from src/common/spdlog/sinks/null_sink.h rename to third_party/spdlog/sinks/null_sink.h diff --git a/src/common/spdlog/sinks/ostream_sink.h b/third_party/spdlog/sinks/ostream_sink.h similarity index 100% rename from src/common/spdlog/sinks/ostream_sink.h rename to third_party/spdlog/sinks/ostream_sink.h diff --git a/src/common/spdlog/sinks/rotating_file_sink-inl.h b/third_party/spdlog/sinks/rotating_file_sink-inl.h similarity index 100% rename from src/common/spdlog/sinks/rotating_file_sink-inl.h rename to third_party/spdlog/sinks/rotating_file_sink-inl.h diff --git a/src/common/spdlog/sinks/rotating_file_sink.h b/third_party/spdlog/sinks/rotating_file_sink.h similarity index 100% rename from src/common/spdlog/sinks/rotating_file_sink.h rename to third_party/spdlog/sinks/rotating_file_sink.h diff --git a/src/common/spdlog/sinks/sink-inl.h b/third_party/spdlog/sinks/sink-inl.h similarity index 100% rename from src/common/spdlog/sinks/sink-inl.h rename to third_party/spdlog/sinks/sink-inl.h diff --git a/src/common/spdlog/sinks/sink.h b/third_party/spdlog/sinks/sink.h similarity index 100% rename from src/common/spdlog/sinks/sink.h rename to third_party/spdlog/sinks/sink.h diff --git a/src/common/spdlog/sinks/wincolor_sink-inl.h b/third_party/spdlog/sinks/wincolor_sink-inl.h similarity index 100% rename from src/common/spdlog/sinks/wincolor_sink-inl.h rename to third_party/spdlog/sinks/wincolor_sink-inl.h diff --git a/src/common/spdlog/sinks/wincolor_sink.h b/third_party/spdlog/sinks/wincolor_sink.h similarity index 100% rename from src/common/spdlog/sinks/wincolor_sink.h rename to third_party/spdlog/sinks/wincolor_sink.h diff --git a/src/common/spdlog/spdlog-inl.h b/third_party/spdlog/spdlog-inl.h similarity index 100% rename from src/common/spdlog/spdlog-inl.h rename to third_party/spdlog/spdlog-inl.h diff --git a/src/common/spdlog/spdlog.h b/third_party/spdlog/spdlog.h similarity index 100% rename from src/common/spdlog/spdlog.h rename to third_party/spdlog/spdlog.h diff --git a/src/common/spdlog/tweakme.h b/third_party/spdlog/tweakme.h similarity index 100% rename from src/common/spdlog/tweakme.h rename to third_party/spdlog/tweakme.h diff --git a/src/common/spdlog/version.h b/third_party/spdlog/version.h similarity index 100% rename from src/common/spdlog/version.h rename to third_party/spdlog/version.h