feat: enhance GPU support detection and user feedback in the engine interface
This commit is contained in:
@@ -102,7 +102,22 @@ export function Shell({ children, activeRun }: { children: ReactNode; activeRun:
|
||||
<div className="mt-1 truncate text-[0.75rem] font-medium text-ink-200" title={system.engine_runtime}>
|
||||
{system.engine_runtime}
|
||||
</div>
|
||||
<div className="text-[0.6875rem] text-ink-500">{system.engine_architecture}</div>
|
||||
<div className="text-[0.6875rem] text-ink-500">
|
||||
{system.engine_architecture}
|
||||
{/* The architecture alone is misleading when the installed
|
||||
llama-cpp-python is a CPU build: it reports the hardware, not what
|
||||
the binary can drive. Saying "CPU build" here is the difference
|
||||
between a user seeing "cuda" and assuming the GPU is busy, and
|
||||
knowing their card is idle. */}
|
||||
{system.engine_gpu_offload === false && (
|
||||
<span className="text-amber-400"> · CPU build</span>
|
||||
)}
|
||||
</div>
|
||||
{system.engine_warning && (
|
||||
<div className="mt-1.5 text-[0.6875rem] leading-snug text-amber-400">
|
||||
{system.engine_warning}
|
||||
</div>
|
||||
)}
|
||||
{!system.template_ok && (
|
||||
<div className="mt-1.5 text-[0.6875rem] text-rose-400">Report template missing</div>
|
||||
)}
|
||||
|
||||
@@ -214,6 +214,12 @@ export interface SystemInfo {
|
||||
version: string
|
||||
engine_architecture: string
|
||||
engine_runtime: string
|
||||
/** Whether the installed llama-cpp-python was built with GPU offload.
|
||||
* null when llama-cpp-python is missing or too old to report it — which is
|
||||
* distinct from a confirmed false. */
|
||||
engine_gpu_offload: boolean | null
|
||||
/** Set when detected hardware and the installed build disagree. */
|
||||
engine_warning: string | null
|
||||
template_ok: boolean
|
||||
python_version: string
|
||||
metrics: Record<string, string>
|
||||
|
||||
@@ -213,6 +213,21 @@ export function SettingsPage() {
|
||||
<dl className="space-y-2.5 text-[0.8125rem]">
|
||||
<InfoRow label="Runtime" value={system.data.engine_runtime} mono />
|
||||
<InfoRow label="Architecture" value={system.data.engine_architecture} />
|
||||
{/* Architecture is detected from hardware; this is what the
|
||||
installed binary can actually drive. The two disagreeing
|
||||
is the difference between a GPU working and sitting idle
|
||||
while the interface still says "cuda". */}
|
||||
{system.data.engine_gpu_offload !== null && (
|
||||
<InfoRow
|
||||
label="GPU offload"
|
||||
value={
|
||||
system.data.engine_gpu_offload
|
||||
? 'Supported by this build'
|
||||
: 'Not in this build (CPU only)'
|
||||
}
|
||||
tone={system.data.engine_gpu_offload ? 'ok' : 'bad'}
|
||||
/>
|
||||
)}
|
||||
<InfoRow label="Platform" value={system.data.metrics.platform ?? '—'} />
|
||||
<InfoRow label="Python" value={system.data.python_version} mono />
|
||||
<InfoRow label="LM-Gambit" value={`v${system.data.version}`} mono />
|
||||
|
||||
Reference in New Issue
Block a user