Intel/AMD GPU telemetry in benchmark runs (hwmon power/temperature, amdgpu sysfs, Intel VRAM/utilization from DRM fdinfo via a minimal host-PID probe container), temperature for all GPUs, VRAM estimate for NVIDIA and Intel/AMD in the deployment form, /dev/dri group IDs added to Intel/AMD runtime containers, Intel llama.cpp presets seeded on first detection, ZES_ENABLE_SYSMAN=1 for the SYCL preset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ee6c623e2a
commit
e007a35143
16 files changed
+781
-98
No files matched your search
@@ -22,6 +22,7 @@ import { Label } from "@/components/ui/label";
|
||||
import { NativeSelect } from "@/components/ui/native-select";
|
||||
import type {
|
||||
DeploymentOptions,
|
||||
HardwareGpu,
|
||||
HostGpu,
|
||||
RuntimeAccelerator,
|
||||
RuntimeEngine,
|
||||
@@ -32,6 +33,7 @@ import {
|
||||
buildCommand,
|
||||
ENGINE_PORT,
|
||||
estimateMemoryMb,
|
||||
estimateVramMb,
|
||||
renderCommand,
|
||||
} from "@/lib/deploy-command";
|
||||
import { argsToRows, rowsToArgs } from "@/lib/extra-args";
|
||||
@@ -62,6 +64,8 @@ export type FormHost = {
|
||||
cpuFeatures: string[];
|
||||
nvidia: boolean;
|
||||
gpus: HostGpu[];
|
||||
/** All GPUs on the host with Settings → Hardware applied (Intel/AMD VRAM for the estimate). */
|
||||
hardwareGpus: HardwareGpu[];
|
||||
} | null;
|
||||
export type FormInitial = {
|
||||
id?: string;
|
||||
@@ -343,6 +347,10 @@ export function DeploymentForm({
|
||||
? hostGpus.filter((g) => gpuIds.includes(g.uuid))
|
||||
: hostGpus;
|
||||
const vramMb = chosenGpus.reduce((s, g) => s + g.memoryMb, 0);
|
||||
// Intel/AMD GPUs come in as /dev/dri: all of them, VRAM as detected (or set in Settings → Hardware).
|
||||
const driGpus = (host?.hardwareGpus ?? []).filter((g) => (accelerator === "rocm" ? g.vendor === "amd" : g.vendor === "intel" || g.vendor === "amd"));
|
||||
const gpuVramMb = accelerator === "nvidia" ? vramMb || null : driGpus.some((g) => g.vramMb) ? driGpus.reduce((s, g) => s + (g.vramMb ?? 0), 0) : null;
|
||||
const vramEstimate = model && gpu ? estimateVramMb(fileBytes, options.contextSize, engine, options, gpuVramMb) : null;
|
||||
const memory = memoryTouched ? intOrNull(memoryMb) : estimate;
|
||||
const preview =
|
||||
runtime && model
|
||||
@@ -840,6 +848,20 @@ export function DeploymentForm({
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{accelerator !== "nvidia" && driGpus.length > 0 && (
|
||||
<p className="text-xs text-muted-foreground sm:col-span-2">
|
||||
{driGpus.map((g) => `${g.name ?? "GPU"}${g.vramMb ? ` (${formatBytes(g.vramMb * 2 ** 20)})` : ""}`).join(", ")} via /dev/dri
|
||||
</p>
|
||||
)}
|
||||
{model && (
|
||||
<p className={`text-xs sm:col-span-2 ${vramEstimate != null && gpuVramMb != null && vramEstimate > gpuVramMb ? "text-amber-700 dark:text-amber-300" : "text-muted-foreground"}`}>
|
||||
{vramEstimate == null
|
||||
? "VRAM need: depends on how many layers/experts go to the GPU."
|
||||
: `VRAM need, roughly: ${formatBytes(vramEstimate * 2 ** 20)}${gpuVramMb ? ` of ${formatBytes(gpuVramMb * 2 ** 20)}` : ""}${
|
||||
engine === "vllm" ? " (vLLM reserves its GPU memory share up front)" : " (weights, KV cache, compute buffers)"
|
||||
}${gpuVramMb != null && vramEstimate > gpuVramMb ? ". Doesn't fit: lower the context, quantize the KV cache or offload fewer layers." : ""}`}
|
||||
</p>
|
||||
)}
|
||||
{engine === "llama.cpp" ? (
|
||||
<>
|
||||
<Field
|
||||
|
||||
@@ -1,16 +1,47 @@
|
||||
import "server-only";
|
||||
import { listApiKeys } from "@/lib/api-keys";
|
||||
import { listDeployableModels } from "@/lib/deployments";
|
||||
import { applyOverrides } from "@/lib/hardware";
|
||||
import { getDockerInfo, listRuntimes } from "@/lib/runtimes";
|
||||
import { getHardwareOverrides } from "@/lib/settings";
|
||||
import type { FormHost, FormModel, FormRuntime } from "./deployment-form";
|
||||
|
||||
/** Everything the deployment form needs: runtimes, servable models, host facts, API key count. */
|
||||
export async function formData(): Promise<{ runtimes: FormRuntime[]; models: FormModel[]; host: FormHost; apiKeyCount: number }> {
|
||||
const [runtimes, models, docker, keys] = await Promise.all([listRuntimes(), listDeployableModels(), getDockerInfo(), listApiKeys()]);
|
||||
export async function formData(): Promise<{
|
||||
runtimes: FormRuntime[];
|
||||
models: FormModel[];
|
||||
host: FormHost;
|
||||
apiKeyCount: number;
|
||||
}> {
|
||||
const [runtimes, models, docker, keys, overrides] = await Promise.all([
|
||||
listRuntimes(),
|
||||
listDeployableModels(),
|
||||
getDockerInfo(),
|
||||
listApiKeys(),
|
||||
getHardwareOverrides(),
|
||||
]);
|
||||
return {
|
||||
runtimes: runtimes.map((r) => ({ id: r.id, name: r.name, engine: r.engine, image: r.image, imageState: r.imageState, env: r.env, extraArgs: r.extraArgs, accelerator: r.accelerator })),
|
||||
runtimes: runtimes.map((r) => ({
|
||||
id: r.id,
|
||||
name: r.name,
|
||||
engine: r.engine,
|
||||
image: r.image,
|
||||
imageState: r.imageState,
|
||||
env: r.env,
|
||||
extraArgs: r.extraArgs,
|
||||
accelerator: r.accelerator,
|
||||
})),
|
||||
models,
|
||||
host: docker ? { cpus: docker.cpus, memoryBytes: docker.memoryBytes, cpuFeatures: docker.cpuFeatures, nvidia: !!docker.nvidia, gpus: docker.gpus ?? [] } : null,
|
||||
host: docker
|
||||
? {
|
||||
cpus: docker.cpus,
|
||||
memoryBytes: docker.memoryBytes,
|
||||
cpuFeatures: docker.cpuFeatures,
|
||||
nvidia: !!docker.nvidia,
|
||||
gpus: docker.gpus ?? [],
|
||||
hardwareGpus: applyOverrides(docker.hardware, overrides)?.gpus ?? [],
|
||||
}
|
||||
: null,
|
||||
apiKeyCount: keys.length,
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user