Commit 2ae79b92 authored by wooway777's avatar wooway777
Browse files

issue/251 - change nt config to op config for kv caching

parent 6ae48322
......@@ -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
```
......
......@@ -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,
......
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment