llama.cpp
4f132b7e - CUDA: move graph and concurrent stream state out of common.cuh

Commit
21 days ago
CUDA: move graph and concurrent stream state out of common.cuh ggml_cuda_graph, ggml_cuda_concurrent_event and ggml_cuda_stream_context are only used by ggml-cuda.cu, but keeping them in common.cuh meant any change to them rebuilt every CUDA translation unit. Move them to graph.cuh and leave forward declarations in common.cuh. The context constructor, cuda_graph() and any_cuda_graph_*() are now defined in ggml-cuda.cu, and the stream context is held through a unique_ptr. Also define ggml_cuda_kernel_can_use_pdl once in ggml-cuda.cu instead of as a static function in the header, so there is one PDL cache instead of one per translation unit, and fold the GGML_CUDA_PDL env check into it.
Author
Parents
Loading