mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
add USE_QAT into build_options
This commit is contained in:
parent
14cda082d2
commit
cf53d9a17c
@ -27,7 +27,7 @@ if (ENABLE_QAT_OUT_OF_TREE_BUILD)
|
||||
${QAT_AL_INCLUDE_DIR}
|
||||
${QAT_USDM_INCLUDE_DIR}
|
||||
${ZSTD_LIBRARY_DIR})
|
||||
target_compile_definitions(_qatzstd_plugin PRIVATE -DDEBUGLEVEL=0 PUBLIC -DENABLE_QATZSTD_COMPRESSION)
|
||||
target_compile_definitions(_qatzstd_plugin PRIVATE -DDEBUGLEVEL=0 PUBLIC -DENABLE_ZSTD_QAT_CODEC)
|
||||
add_library (ch_contrib::qatzstd_plugin ALIAS _qatzstd_plugin)
|
||||
else () # In-tree build
|
||||
message(STATUS "Intel QATZSTD in-tree build")
|
||||
|
@ -86,17 +86,21 @@ CompressionCodecZSTDQAT::CompressionCodecZSTDQAT(int level_)
|
||||
cctx = ZSTD_createCCtx();
|
||||
|
||||
int res = QZSTD_startQatDevice();
|
||||
LOG_DEBUG(log, "Initialization of ZSTD_QAT codec, status: {} ", res);
|
||||
|
||||
if(res == QZSTD_OK)
|
||||
{
|
||||
sequenceProducerState = QZSTD_createSeqProdState();
|
||||
|
||||
ZSTD_registerSequenceProducer(
|
||||
cctx,
|
||||
sequenceProducerState,
|
||||
qatSequenceProducer
|
||||
);
|
||||
|
||||
ZSTD_CCtx_setParameter(cctx, ZSTD_c_enableSeqProducerFallback, 1);
|
||||
LOG_DEBUG(log, "Hardware-assisted ZSTD_QAT codec is ready!");
|
||||
}
|
||||
else
|
||||
LOG_DEBUG(log, "Initialization of hardware-assisted ZSTD_QAT codec failed, status: {} - please refer to QZSTD_Status_e in ./contrib/QAT-ZSTD-Plugin/src/qatseqprod.h", res);
|
||||
|
||||
ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, level);
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,7 @@ const char * auto_config_build[]
|
||||
"USE_ORC", "@USE_ORC@",
|
||||
"USE_MSGPACK", "@USE_MSGPACK@",
|
||||
"USE_QPL", "@ENABLE_QPL@",
|
||||
"USE_QAT", "@ENABLE_QATLIB@",
|
||||
"GIT_HASH", "@GIT_HASH@",
|
||||
"GIT_BRANCH", R"IRjaNsZIL9Yh7FQ4(@GIT_BRANCH@)IRjaNsZIL9Yh7FQ4",
|
||||
"GIT_DATE", "@GIT_DATE@",
|
||||
|
Loading…
Reference in New Issue
Block a user