Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinilm
Commits
2ae79b92
Commit
2ae79b92
authored
Mar 03, 2026
by
wooway777
Browse files
issue/251 - change nt config to op config for kv caching
parent
6ae48322
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
README.md
README.md
+2
-2
csrc/cache/kv_cache.cpp
csrc/cache/kv_cache.cpp
+1
-1
xmake.lua
xmake.lua
+4
-4
No files found.
README.md
View file @
2ae79b92
...
@@ -63,9 +63,9 @@ python scripts/test_ppl.py --model-path MODEL_PATH [--ndev NDEV] [--max-batch MA
...
@@ -63,9 +63,9 @@ python scripts/test_ppl.py --model-path MODEL_PATH [--ndev NDEV] [--max-batch MA
```
```
-
选择是否使用
九齿计算路径,默认为false,即不依赖九齿算子
-
选择是否使用
kv caching,默认为false;在支持了此算子的平台(英伟达、阿里、天数、沐曦、海光、QY)可以使用
```
bash
```
bash
xmake f
--
ninetoothed
=
[
true
|
false
]
-cv
xmake f
--
use-kv-caching
=
[
true
|
false
]
-cv
```
```
...
...
csrc/cache/kv_cache.cpp
View file @
2ae79b92
...
@@ -93,7 +93,7 @@ StaticKVCache::update(size_t layer_idx,
...
@@ -93,7 +93,7 @@ StaticKVCache::update(size_t layer_idx,
auto
device
=
k_cache_layer
->
device
();
auto
device
=
k_cache_layer
->
device
();
#ifdef ENABLE_
NINETOOTHED
#ifdef ENABLE_
KV_CACHING
infinicore
::
op
::
kv_caching_
(
infinicore
::
op
::
kv_caching_
(
k_cache_layer
,
k_cache_layer
,
v_cache_layer
,
v_cache_layer
,
...
...
xmake.lua
View file @
2ae79b92
...
@@ -8,14 +8,14 @@ set_toolchains("gcc")
...
@@ -8,14 +8,14 @@ set_toolchains("gcc")
add_includedirs
(
"third_party/spdlog/include"
)
add_includedirs
(
"third_party/spdlog/include"
)
add_includedirs
(
"third_party/json/single_include/"
)
add_includedirs
(
"third_party/json/single_include/"
)
option
(
"
ninetoothed
"
)
option
(
"
use-kv-caching
"
)
set_default
(
false
)
set_default
(
false
)
set_showmenu
(
true
)
set_showmenu
(
true
)
set_description
(
"Whether to comp
lie NineToothed specifc path
"
)
set_description
(
"Whether to comp
ile the path using the kv caching operator
"
)
option_end
()
option_end
()
if
has_config
(
"
ninetoothed
"
)
then
if
has_config
(
"
use-kv-caching
"
)
then
add_defines
(
"ENABLE_
NINETOOTHED
"
)
add_defines
(
"ENABLE_
KV_CACHING
"
)
end
end
target
(
"infinicore_infer"
)
target
(
"infinicore_infer"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment