diff --git a/README.md b/README.md index f8020077..2fd0a8a4 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,9 @@ python scripts/test_ppl.py --model-path MODEL_PATH [--ndev NDEV] [--max-batch MA ``` - - 选择是否使用九齿计算路径,默认为false,即不依赖九齿算子 + - 选择是否使用kv caching,默认为false;在支持了此算子的平台(英伟达、阿里、天数、沐曦、海光、QY)可以使用 ```bash - xmake f --ninetoothed= [true | false] -cv + xmake f --use-kv-caching= [true | false] -cv ``` diff --git a/csrc/cache/kv_cache.cpp b/csrc/cache/kv_cache.cpp index 04f5e54c..0872c980 100644 --- a/csrc/cache/kv_cache.cpp +++ b/csrc/cache/kv_cache.cpp @@ -93,7 +93,7 @@ StaticKVCache::update(size_t layer_idx, auto device = k_cache_layer->device(); -#ifdef ENABLE_NINETOOTHED +#ifdef ENABLE_KV_CACHING infinicore::op::kv_caching_( k_cache_layer, v_cache_layer, diff --git a/xmake.lua b/xmake.lua index 739fe913..c29875aa 100644 --- a/xmake.lua +++ b/xmake.lua @@ -8,14 +8,14 @@ set_toolchains("gcc") add_includedirs("third_party/spdlog/include") add_includedirs("third_party/json/single_include/") -option("ninetoothed") +option("use-kv-caching") set_default(false) set_showmenu(true) - set_description("Whether to complie NineToothed specifc path") + set_description("Whether to compile the path using the kv caching operator") option_end() -if has_config("ninetoothed") then - add_defines("ENABLE_NINETOOTHED") +if has_config("use-kv-caching") then + add_defines("ENABLE_KV_CACHING") end target("infinicore_infer")