]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
llama : make tensor-split regex patterns static (#24710)
authoreduardopessin <redacted>
Fri, 10 Jul 2026 17:04:12 +0000 (18:04 +0100)
committerGitHub <redacted>
Fri, 10 Jul 2026 17:04:12 +0000 (19:04 +0200)
commitc749cb041706647f460bb918cccc9d91995205ab
treee341948f241492a9e80fbc73a30cdb8f17eab9c9
parent67776eaee549be9e1e0359726c13c399b9224d2e
llama : make tensor-split regex patterns static (#24710)

llama_meta_device_get_split_state() recompiled 29 std::regex on every call.
In -sm tensor mode the callback runs once per tensor per token, so this
dominated the decode thread in profiling. Mark them static const so they are
compiled once. Kept inside the function (local statics are thread-safe since
C++11). Patterns are literal and stateless, so behavior is unchanged.
src/llama-model.cpp