Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,11 @@ jobs:
-v -o "addopts="

cmake --preset llm-release-cuda -DEXECUTORCH_BUILD_TESTS=ON
cmake --build cmake-out --target test_cuda_allocator test_cuda_mutable_state test_cuda_weight_cache test_cuda_guard test_cuda_stream_guard -j$(nproc)
cmake --build cmake-out --target test_cuda_allocator test_cuda_mutable_state test_cuda_weight_cache test_cuda_kv_cache test_cuda_guard test_cuda_stream_guard -j$(nproc)
ctest --test-dir cmake-out -R test_cuda_allocator --output-on-failure -V
ctest --test-dir cmake-out -R test_cuda_mutable_state --output-on-failure -V
ctest --test-dir cmake-out -R test_cuda_weight_cache --output-on-failure -V
ctest --test-dir cmake-out -R test_cuda_kv_cache --output-on-failure -V
ctest --test-dir cmake-out -R test_cuda_guard --output-on-failure -V
ctest --test-dir cmake-out -R test_cuda_stream_guard --output-on-failure -V

Expand Down
12 changes: 11 additions & 1 deletion backends/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,9 @@ set(_aoti_cuda_backend_sources
)
# The off-graph KV cache builds on the LLM extension's neutral cache.
if(EXECUTORCH_BUILD_EXTENSION_LLM)
list(APPEND _aoti_cuda_backend_sources runtime/cuda_kv_cache.cpp)
list(APPEND _aoti_cuda_backend_sources runtime/cuda_kv_cache.cpp
runtime/cuda_kv_pool.cpp
)
endif()
if(_cuda_is_msvc_toolchain)
# MSVC links aoti_cuda_backend into portable_lib without relying on C++
Expand Down Expand Up @@ -480,4 +482,12 @@ if(BUILD_TESTING)
EXTRA_LIBS aoti_cuda_backend
)
target_compile_definitions(test_cuda_weight_cache PRIVATE CUDA_AVAILABLE=1)

if(EXECUTORCH_BUILD_EXTENSION_LLM)
et_cxx_test(
test_cuda_kv_cache SOURCES runtime/test/test_cuda_kv_cache.cpp EXTRA_LIBS
aoti_cuda_backend
)
target_compile_definitions(test_cuda_kv_cache PRIVATE CUDA_AVAILABLE=1)
endif()
endif()
Loading
Loading