mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Merge pull request #67933 from mzhukova/dev/mzhukova/upd-qpl-1.6.0
Upgrade QPL to v1.6.0
This commit is contained in:
commit
e07f8b4807
2
contrib/qpl
vendored
2
contrib/qpl
vendored
@ -1 +1 @@
|
|||||||
Subproject commit d4715e0e79896b85612158e135ee1a85f3b3e04d
|
Subproject commit c2ced94c53c1ee22191201a59878e9280bc9b9b8
|
@ -4,7 +4,6 @@ set (QPL_PROJECT_DIR "${ClickHouse_SOURCE_DIR}/contrib/qpl")
|
|||||||
set (QPL_SRC_DIR "${ClickHouse_SOURCE_DIR}/contrib/qpl/sources")
|
set (QPL_SRC_DIR "${ClickHouse_SOURCE_DIR}/contrib/qpl/sources")
|
||||||
set (QPL_BINARY_DIR "${ClickHouse_BINARY_DIR}/build/contrib/qpl")
|
set (QPL_BINARY_DIR "${ClickHouse_BINARY_DIR}/build/contrib/qpl")
|
||||||
set (EFFICIENT_WAIT OFF)
|
set (EFFICIENT_WAIT OFF)
|
||||||
set (BLOCK_ON_FAULT ON)
|
|
||||||
set (LOG_HW_INIT OFF)
|
set (LOG_HW_INIT OFF)
|
||||||
set (SANITIZE_MEMORY OFF)
|
set (SANITIZE_MEMORY OFF)
|
||||||
set (SANITIZE_THREADS OFF)
|
set (SANITIZE_THREADS OFF)
|
||||||
@ -16,16 +15,20 @@ function(GetLibraryVersion _content _outputVar)
|
|||||||
SET(${_outputVar} ${CMAKE_MATCH_1} PARENT_SCOPE)
|
SET(${_outputVar} ${CMAKE_MATCH_1} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
set (QPL_VERSION 1.2.0)
|
set (QPL_VERSION 1.6.0)
|
||||||
|
|
||||||
message(STATUS "Intel QPL version: ${QPL_VERSION}")
|
message(STATUS "Intel QPL version: ${QPL_VERSION}")
|
||||||
|
|
||||||
# There are 5 source subdirectories under $QPL_SRC_DIR: isal, c_api, core-sw, middle-layer, c_api.
|
# There are 5 source subdirectories under $QPL_SRC_DIR: c_api, core-iaa, core-sw, middle-layer and isal.
|
||||||
# Generate 8 library targets: middle_layer_lib, isal, isal_asm, qplcore_px, qplcore_avx512, qplcore_sw_dispatcher, core_iaa, middle_layer_lib.
|
# Generate 8 library targets: qpl_c_api, core_iaa, qplcore_px, qplcore_avx512, qplcore_sw_dispatcher, middle_layer_lib, isal and isal_asm,
|
||||||
|
# which are then combined into static or shared qpl.
|
||||||
# Output ch_contrib::qpl by linking with 8 library targets.
|
# Output ch_contrib::qpl by linking with 8 library targets.
|
||||||
|
|
||||||
# The qpl submodule comes with its own version of isal. It contains code which does not exist in upstream isal. It would be nice to link
|
# Note, QPL has integrated a customized version of ISA-L to meet specific needs.
|
||||||
# only upstream isal (ch_contrib::isal) but at this point we can't.
|
# This version has been significantly modified and there are no plans to maintain compatibility with the upstream version
|
||||||
|
# or upgrade the current copy.
|
||||||
|
|
||||||
|
## cmake/CompileOptions.cmake and automatic wrappers generation
|
||||||
|
|
||||||
# ==========================================================================
|
# ==========================================================================
|
||||||
# Copyright (C) 2022 Intel Corporation
|
# Copyright (C) 2022 Intel Corporation
|
||||||
@ -442,6 +445,7 @@ function(generate_unpack_kernel_arrays current_directory PLATFORMS_LIST)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
# [SUBDIR]isal
|
||||||
|
|
||||||
enable_language(ASM_NASM)
|
enable_language(ASM_NASM)
|
||||||
|
|
||||||
@ -479,7 +483,6 @@ set(ISAL_ASM_SRC ${QPL_SRC_DIR}/isal/igzip/igzip_body.asm
|
|||||||
${QPL_SRC_DIR}/isal/igzip/igzip_set_long_icf_fg_04.asm
|
${QPL_SRC_DIR}/isal/igzip/igzip_set_long_icf_fg_04.asm
|
||||||
${QPL_SRC_DIR}/isal/igzip/igzip_set_long_icf_fg_06.asm
|
${QPL_SRC_DIR}/isal/igzip/igzip_set_long_icf_fg_06.asm
|
||||||
${QPL_SRC_DIR}/isal/igzip/igzip_multibinary.asm
|
${QPL_SRC_DIR}/isal/igzip/igzip_multibinary.asm
|
||||||
${QPL_SRC_DIR}/isal/igzip/stdmac.asm
|
|
||||||
${QPL_SRC_DIR}/isal/crc/crc_multibinary.asm
|
${QPL_SRC_DIR}/isal/crc/crc_multibinary.asm
|
||||||
${QPL_SRC_DIR}/isal/crc/crc32_gzip_refl_by8.asm
|
${QPL_SRC_DIR}/isal/crc/crc32_gzip_refl_by8.asm
|
||||||
${QPL_SRC_DIR}/isal/crc/crc32_gzip_refl_by8_02.asm
|
${QPL_SRC_DIR}/isal/crc/crc32_gzip_refl_by8_02.asm
|
||||||
@ -505,7 +508,6 @@ set_property(GLOBAL APPEND PROPERTY QPL_LIB_DEPS
|
|||||||
# Setting external and internal interfaces for ISA-L library
|
# Setting external and internal interfaces for ISA-L library
|
||||||
target_include_directories(isal
|
target_include_directories(isal
|
||||||
PUBLIC $<BUILD_INTERFACE:${QPL_SRC_DIR}/isal/include>
|
PUBLIC $<BUILD_INTERFACE:${QPL_SRC_DIR}/isal/include>
|
||||||
PRIVATE ${QPL_SRC_DIR}/isal/include
|
|
||||||
PUBLIC ${QPL_SRC_DIR}/isal/igzip)
|
PUBLIC ${QPL_SRC_DIR}/isal/igzip)
|
||||||
|
|
||||||
set_target_properties(isal PROPERTIES
|
set_target_properties(isal PROPERTIES
|
||||||
@ -617,12 +619,9 @@ target_compile_options(qplcore_sw_dispatcher
|
|||||||
|
|
||||||
# [SUBDIR]core-iaa
|
# [SUBDIR]core-iaa
|
||||||
file(GLOB HW_PATH_SRC ${QPL_SRC_DIR}/core-iaa/sources/aecs/*.c
|
file(GLOB HW_PATH_SRC ${QPL_SRC_DIR}/core-iaa/sources/aecs/*.c
|
||||||
${QPL_SRC_DIR}/core-iaa/sources/aecs/*.cpp
|
|
||||||
${QPL_SRC_DIR}/core-iaa/sources/driver_loader/*.c
|
${QPL_SRC_DIR}/core-iaa/sources/driver_loader/*.c
|
||||||
${QPL_SRC_DIR}/core-iaa/sources/driver_loader/*.cpp
|
|
||||||
${QPL_SRC_DIR}/core-iaa/sources/descriptors/*.c
|
${QPL_SRC_DIR}/core-iaa/sources/descriptors/*.c
|
||||||
${QPL_SRC_DIR}/core-iaa/sources/descriptors/*.cpp
|
${QPL_SRC_DIR}/core-iaa/sources/*.c)
|
||||||
${QPL_SRC_DIR}/core-iaa/sources/bit_rev.c)
|
|
||||||
|
|
||||||
# Create library
|
# Create library
|
||||||
add_library(core_iaa OBJECT ${HW_PATH_SRC})
|
add_library(core_iaa OBJECT ${HW_PATH_SRC})
|
||||||
@ -634,31 +633,27 @@ target_include_directories(core_iaa
|
|||||||
PRIVATE ${UUID_DIR}
|
PRIVATE ${UUID_DIR}
|
||||||
PUBLIC $<BUILD_INTERFACE:${QPL_SRC_DIR}/core-iaa/include>
|
PUBLIC $<BUILD_INTERFACE:${QPL_SRC_DIR}/core-iaa/include>
|
||||||
PUBLIC $<BUILD_INTERFACE:${QPL_SRC_DIR}/core-iaa/sources/include>
|
PUBLIC $<BUILD_INTERFACE:${QPL_SRC_DIR}/core-iaa/sources/include>
|
||||||
PRIVATE $<BUILD_INTERFACE:${QPL_PROJECT_DIR}/include> # status.h in own_checkers.h
|
PRIVATE $<BUILD_INTERFACE:${QPL_PROJECT_DIR}/include> # status.h in own_checkers.h
|
||||||
PRIVATE $<BUILD_INTERFACE:${QPL_PROJECT_DIR}/sources/c_api> # own_checkers.h
|
PRIVATE $<TARGET_PROPERTY:qpl_c_api,INTERFACE_INCLUDE_DIRECTORIES> # for own_checkers.h
|
||||||
PRIVATE $<TARGET_PROPERTY:qplcore_sw_dispatcher,INTERFACE_INCLUDE_DIRECTORIES>)
|
PRIVATE $<TARGET_PROPERTY:qplcore_sw_dispatcher,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||||
|
|
||||||
target_compile_features(core_iaa PRIVATE c_std_11)
|
target_compile_features(core_iaa PRIVATE c_std_11)
|
||||||
|
|
||||||
target_compile_definitions(core_iaa PRIVATE QPL_BADARG_CHECK
|
target_compile_definitions(core_iaa PRIVATE QPL_BADARG_CHECK
|
||||||
PRIVATE $<$<BOOL:${BLOCK_ON_FAULT}>: BLOCK_ON_FAULT_ENABLED>
|
|
||||||
PRIVATE $<$<BOOL:${LOG_HW_INIT}>:LOG_HW_INIT>
|
PRIVATE $<$<BOOL:${LOG_HW_INIT}>:LOG_HW_INIT>
|
||||||
PRIVATE $<$<BOOL:${DYNAMIC_LOADING_LIBACCEL_CONFIG}>:DYNAMIC_LOADING_LIBACCEL_CONFIG>)
|
PRIVATE $<$<BOOL:${DYNAMIC_LOADING_LIBACCEL_CONFIG}>:DYNAMIC_LOADING_LIBACCEL_CONFIG>)
|
||||||
|
|
||||||
# [SUBDIR]middle-layer
|
# [SUBDIR]middle-layer
|
||||||
file(GLOB MIDDLE_LAYER_SRC
|
file(GLOB MIDDLE_LAYER_SRC
|
||||||
${QPL_SRC_DIR}/middle-layer/analytics/*.cpp
|
${QPL_SRC_DIR}/middle-layer/accelerator/*.cpp
|
||||||
${QPL_SRC_DIR}/middle-layer/c_wrapper/*.cpp
|
${QPL_SRC_DIR}/middle-layer/analytics/*.cpp
|
||||||
${QPL_SRC_DIR}/middle-layer/checksum/*.cpp
|
|
||||||
${QPL_SRC_DIR}/middle-layer/common/*.cpp
|
${QPL_SRC_DIR}/middle-layer/common/*.cpp
|
||||||
${QPL_SRC_DIR}/middle-layer/compression/*.cpp
|
${QPL_SRC_DIR}/middle-layer/compression/*.cpp
|
||||||
${QPL_SRC_DIR}/middle-layer/compression/*/*.cpp
|
${QPL_SRC_DIR}/middle-layer/compression/*/*.cpp
|
||||||
${QPL_SRC_DIR}/middle-layer/compression/*/*/*.cpp
|
${QPL_SRC_DIR}/middle-layer/compression/*/*/*.cpp
|
||||||
${QPL_SRC_DIR}/middle-layer/dispatcher/*.cpp
|
${QPL_SRC_DIR}/middle-layer/dispatcher/*.cpp
|
||||||
${QPL_SRC_DIR}/middle-layer/other/*.cpp
|
${QPL_SRC_DIR}/middle-layer/other/*.cpp
|
||||||
${QPL_SRC_DIR}/middle-layer/util/*.cpp
|
${QPL_SRC_DIR}/middle-layer/util/*.cpp)
|
||||||
${QPL_SRC_DIR}/middle-layer/inflate/*.cpp
|
|
||||||
${QPL_SRC_DIR}/core-iaa/sources/accelerator/*.cpp) # todo
|
|
||||||
|
|
||||||
add_library(middle_layer_lib OBJECT
|
add_library(middle_layer_lib OBJECT
|
||||||
${MIDDLE_LAYER_SRC})
|
${MIDDLE_LAYER_SRC})
|
||||||
@ -667,6 +662,7 @@ set_property(GLOBAL APPEND PROPERTY QPL_LIB_DEPS
|
|||||||
$<TARGET_OBJECTS:middle_layer_lib>)
|
$<TARGET_OBJECTS:middle_layer_lib>)
|
||||||
|
|
||||||
target_compile_options(middle_layer_lib
|
target_compile_options(middle_layer_lib
|
||||||
|
PRIVATE $<$<C_COMPILER_ID:GNU,Clang>:$<$<CONFIG:Release>:-O3;-U_FORTIFY_SOURCE;-D_FORTIFY_SOURCE=2>>
|
||||||
PRIVATE ${QPL_LINUX_TOOLCHAIN_CPP_EMBEDDED_FLAGS})
|
PRIVATE ${QPL_LINUX_TOOLCHAIN_CPP_EMBEDDED_FLAGS})
|
||||||
|
|
||||||
target_compile_definitions(middle_layer_lib
|
target_compile_definitions(middle_layer_lib
|
||||||
@ -682,6 +678,7 @@ target_include_directories(middle_layer_lib
|
|||||||
PRIVATE ${UUID_DIR}
|
PRIVATE ${UUID_DIR}
|
||||||
PUBLIC $<BUILD_INTERFACE:${QPL_SRC_DIR}/middle-layer>
|
PUBLIC $<BUILD_INTERFACE:${QPL_SRC_DIR}/middle-layer>
|
||||||
PUBLIC $<TARGET_PROPERTY:_qpl,INTERFACE_INCLUDE_DIRECTORIES>
|
PUBLIC $<TARGET_PROPERTY:_qpl,INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
|
PRIVATE $<TARGET_PROPERTY:qpl_c_api,INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
PUBLIC $<TARGET_PROPERTY:qplcore_sw_dispatcher,INTERFACE_INCLUDE_DIRECTORIES>
|
PUBLIC $<TARGET_PROPERTY:qplcore_sw_dispatcher,INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
PUBLIC $<TARGET_PROPERTY:isal,INTERFACE_INCLUDE_DIRECTORIES>
|
PUBLIC $<TARGET_PROPERTY:isal,INTERFACE_INCLUDE_DIRECTORIES>
|
||||||
PUBLIC $<TARGET_PROPERTY:core_iaa,INTERFACE_INCLUDE_DIRECTORIES>)
|
PUBLIC $<TARGET_PROPERTY:core_iaa,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||||
@ -689,31 +686,54 @@ target_include_directories(middle_layer_lib
|
|||||||
target_compile_definitions(middle_layer_lib PUBLIC -DQPL_LIB)
|
target_compile_definitions(middle_layer_lib PUBLIC -DQPL_LIB)
|
||||||
|
|
||||||
# [SUBDIR]c_api
|
# [SUBDIR]c_api
|
||||||
file(GLOB_RECURSE QPL_C_API_SRC
|
file(GLOB QPL_C_API_SRC
|
||||||
${QPL_SRC_DIR}/c_api/*.c
|
${QPL_SRC_DIR}/c_api/compression_operations/*.c
|
||||||
${QPL_SRC_DIR}/c_api/*.cpp)
|
${QPL_SRC_DIR}/c_api/compression_operations/*.cpp
|
||||||
|
${QPL_SRC_DIR}/c_api/filter_operations/*.cpp
|
||||||
|
${QPL_SRC_DIR}/c_api/legacy_hw_path/*.c
|
||||||
|
${QPL_SRC_DIR}/c_api/legacy_hw_path/*.cpp
|
||||||
|
${QPL_SRC_DIR}/c_api/other_operations/*.cpp
|
||||||
|
${QPL_SRC_DIR}/c_api/serialization/*.cpp
|
||||||
|
${QPL_SRC_DIR}/c_api/*.cpp)
|
||||||
|
|
||||||
|
add_library(qpl_c_api OBJECT ${QPL_C_API_SRC})
|
||||||
|
|
||||||
|
target_include_directories(qpl_c_api
|
||||||
|
PUBLIC $<BUILD_INTERFACE:${QPL_SRC_DIR}/c_api/>
|
||||||
|
PUBLIC $<BUILD_INTERFACE:${QPL_SRC_DIR}/include/> $<INSTALL_INTERFACE:include>
|
||||||
|
PRIVATE $<TARGET_PROPERTY:middle_layer_lib,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||||
|
|
||||||
|
set_target_properties(qpl_c_api PROPERTIES
|
||||||
|
$<$<C_COMPILER_ID:GNU,Clang>:C_STANDARD 17
|
||||||
|
CXX_STANDARD 17)
|
||||||
|
|
||||||
|
target_compile_options(qpl_c_api
|
||||||
|
PRIVATE $<$<C_COMPILER_ID:GNU,Clang>:$<$<CONFIG:Release>:-O3;-U_FORTIFY_SOURCE;-D_FORTIFY_SOURCE=2>>
|
||||||
|
PRIVATE $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:${QPL_LINUX_TOOLCHAIN_CPP_EMBEDDED_FLAGS}>)
|
||||||
|
|
||||||
|
target_compile_definitions(qpl_c_api
|
||||||
|
PUBLIC -DQPL_BADARG_CHECK # own_checkers.h
|
||||||
|
PUBLIC -DQPL_LIB # needed for middle_layer_lib
|
||||||
|
PUBLIC $<$<BOOL:${LOG_HW_INIT}>:LOG_HW_INIT>) # needed for middle_layer_lib
|
||||||
|
|
||||||
|
set_property(GLOBAL APPEND PROPERTY QPL_LIB_DEPS
|
||||||
|
$<TARGET_OBJECTS:qpl_c_api>)
|
||||||
|
|
||||||
|
# Final _qpl target
|
||||||
|
|
||||||
get_property(LIB_DEPS GLOBAL PROPERTY QPL_LIB_DEPS)
|
get_property(LIB_DEPS GLOBAL PROPERTY QPL_LIB_DEPS)
|
||||||
|
|
||||||
add_library(_qpl STATIC ${QPL_C_API_SRC} ${LIB_DEPS})
|
add_library(_qpl STATIC ${LIB_DEPS})
|
||||||
|
|
||||||
target_include_directories(_qpl
|
target_include_directories(_qpl
|
||||||
PUBLIC $<BUILD_INTERFACE:${QPL_PROJECT_DIR}/include/> $<INSTALL_INTERFACE:include>
|
PUBLIC $<BUILD_INTERFACE:${QPL_PROJECT_DIR}/include/> $<INSTALL_INTERFACE:include>)
|
||||||
PRIVATE $<TARGET_PROPERTY:middle_layer_lib,INTERFACE_INCLUDE_DIRECTORIES>
|
|
||||||
PRIVATE $<BUILD_INTERFACE:${QPL_SRC_DIR}/c_api>)
|
|
||||||
|
|
||||||
target_compile_options(_qpl
|
|
||||||
PRIVATE ${QPL_LINUX_TOOLCHAIN_CPP_EMBEDDED_FLAGS})
|
|
||||||
|
|
||||||
target_compile_definitions(_qpl
|
target_compile_definitions(_qpl
|
||||||
PRIVATE -DQPL_LIB
|
|
||||||
PRIVATE -DQPL_BADARG_CHECK
|
|
||||||
PRIVATE $<$<BOOL:${DYNAMIC_LOADING_LIBACCEL_CONFIG}>:DYNAMIC_LOADING_LIBACCEL_CONFIG>
|
|
||||||
PUBLIC -DENABLE_QPL_COMPRESSION)
|
PUBLIC -DENABLE_QPL_COMPRESSION)
|
||||||
|
|
||||||
target_link_libraries(_qpl
|
target_link_libraries(_qpl
|
||||||
PRIVATE ch_contrib::accel-config
|
PRIVATE ch_contrib::accel-config)
|
||||||
PRIVATE ch_contrib::isal)
|
|
||||||
|
|
||||||
target_include_directories(_qpl SYSTEM BEFORE
|
target_include_directories(_qpl SYSTEM BEFORE
|
||||||
PUBLIC "${QPL_PROJECT_DIR}/include"
|
PUBLIC "${QPL_PROJECT_DIR}/include"
|
||||||
|
Loading…
Reference in New Issue
Block a user