diff --git a/.gitmodules b/.gitmodules index 6e63474e0f1..ed61ddb96ba 100644 --- a/.gitmodules +++ b/.gitmodules @@ -338,6 +338,3 @@ [submodule "contrib/isa-l"] path = contrib/isa-l url = https://github.com/ClickHouse/isa-l.git -[submodule "contrib/idxd-config"] - path = contrib/idxd-config - url = https://github.com/intel/idxd-config diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 59087d21bb3..901df1b2432 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -177,8 +177,19 @@ endif() add_contrib (sqlite-cmake sqlite-amalgamation) add_contrib (s2geometry-cmake s2geometry) add_contrib (c-ares-cmake c-ares) -add_contrib (qpl-cmake qpl) -add_contrib (idxd-config-cmake idxd-config) + +if (OS_LINUX AND ARCH_AMD64 AND (ENABLE_AVX2 OR ENABLE_AVX512)) + option (ENABLE_QPL "Enable Intel® Query Processing Library" ${ENABLE_LIBRARIES}) +elseif(ENABLE_QPL) + message (${RECONFIGURE_MESSAGE_LEVEL} "QPL library is only supported on x86_64 arch with avx2/avx512 support") +endif() +if (ENABLE_QPL) + add_contrib (idxd-config-cmake idxd-config) + add_contrib (qpl-cmake qpl) # requires: idxd-config +else() + message(STATUS "Not using QPL") +endif () + add_contrib (morton-nd-cmake morton-nd) if (ARCH_S390X) add_contrib(crc32-s390x-cmake crc32-s390x) diff --git a/contrib/idxd-config-cmake/CMakeLists.txt b/contrib/idxd-config-cmake/CMakeLists.txt index f70644d6fea..030252ec8e6 100644 --- a/contrib/idxd-config-cmake/CMakeLists.txt +++ b/contrib/idxd-config-cmake/CMakeLists.txt @@ -1,17 +1,4 @@ ## accel_config is the utility library required by QPL-Deflate codec for controlling and configuring Intel® In-Memory Analytics Accelerator (Intel® IAA). -option(ENABLE_ACCEL_CONFIG "Enable accel-config library" ${ENABLE_LIBRARIES}) - -if (NOT ENABLE_QPL) - # Disable accel-config aligned with QPL. - set (ENABLE_ACCEL_CONFIG OFF) -endif () -if (NOT ENABLE_ACCEL_CONFIG) - message(STATUS "Not using accel-config") - return() -else() - message(STATUS "Enable accel-config") -endif() - set (LIBACCEL_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/idxd-config") set (UUID_DIR "${ClickHouse_SOURCE_DIR}/contrib/qpl-cmake") set (LIBACCEL_HEADER_DIR "${ClickHouse_SOURCE_DIR}/contrib/idxd-config-cmake/include") diff --git a/contrib/qpl-cmake/CMakeLists.txt b/contrib/qpl-cmake/CMakeLists.txt index 3b8c2628ec8..034106b51b6 100644 --- a/contrib/qpl-cmake/CMakeLists.txt +++ b/contrib/qpl-cmake/CMakeLists.txt @@ -1,16 +1,4 @@ ## The Intel® QPL provides high performance implementations of data processing functions for existing hardware accelerator, and/or software path in case if hardware accelerator is not available. -if (OS_LINUX AND ARCH_AMD64 AND (ENABLE_AVX2 OR ENABLE_AVX512)) - option (ENABLE_QPL "Enable Intel® Query Processing Library" ${ENABLE_LIBRARIES}) -elseif(ENABLE_QPL) - message (${RECONFIGURE_MESSAGE_LEVEL} "QPL library is only supported on x86_64 arch with avx2/avx512 support") -endif() - -if (NOT ENABLE_QPL) - message(STATUS "Not using QPL") - return() -endif() - -## QPL build start here. set (UUID_DIR "${ClickHouse_SOURCE_DIR}/contrib/qpl-cmake") set (QPL_PROJECT_DIR "${ClickHouse_SOURCE_DIR}/contrib/qpl") set (QPL_SRC_DIR "${ClickHouse_SOURCE_DIR}/contrib/qpl/sources")