Files
LocalAI/pkg/xsysinfo/process_vram_other.go
T
localai-org-maint-botandlocalai-org-maint-bot f154bd990a feat(system): report per-model DRM VRAM (#12026)
* feat(system): report per-model DRM VRAM

Expose optional resident device memory for local backend process trees.
Deduplicate DRM clients and omit unsupported or incomplete readings.
Document accounting limits and preserve a measured zero in JSON.

Closes #11970.

Assisted-by: Codex:gpt-6

* fix(system): document trusted procfs reads

Scope G304 annotations to paths built from the fixed procfs root,
integer process IDs, and kernel directory entries. These reads accept
no user-controlled path components.

Assisted-by: Codex:GPT-6 gosec

---------

Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com>
2026-09-27 21:18:34 +02:00

10 lines
211 B
Go

//go:build !linux
// SPDX-License-Identifier: MIT
package xsysinfo
// ProcessVRAM is unavailable on platforms without Linux DRM fdinfo accounting.
func ProcessVRAM(pid int) (uint64, bool) {
return 0, false
}