12#include <ggml-backend.h>
16#include <sys/resource.h>
24std::atomic<uint64_t> s_query_count{0};
46 logger->info(
"[residency] no GPU device registered — "
47 "VRAM budget unknown, admission gate disabled");
53 logger->info(
"[residency] device '{}' reports {} MiB free of {} MiB total",
gh#142: ask the GPU how much VRAM is actually free.
spdlog initialization and logger access.
ENTROPIC_EXPORT std::shared_ptr< spdlog::logger > get(const std::string &name)
Get or create a named logger.
Activate model on GPU (WARM → ACTIVE).
uint64_t host_memlock_limit_bytes()
This process's RLIMIT_MEMLOCK soft limit (gh#148).
@ optional
optional: every escape asks the host's path approver
constexpr uint64_t kMemlockUnlimited
Sentinel for an unlimited RLIMIT_MEMLOCK (gh#148).
uint64_t query_device_free_vram_bytes()
Free VRAM on the first GPU device ggml reports, in bytes.
uint64_t device_memory_query_count()
How many device free-VRAM queries this process has made (gh#198).
How many layers of an oversized GGUF fit the free VRAM, purely.