MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / logGpuProbeFailure

Function logGpuProbeFailure

packages/engine/src/utils/gpuEncoder.ts:192–212  ·  view source on GitHub ↗
(
  encoder: ConcreteGpuEncoder,
  result: {
    code?: number | null;
    error?: Error;
    signal?: NodeJS.Signals | null;
    stderr?: string;
    timedOut?: boolean;
  },
)

Source from the content-addressed store, hash-verified

190}
191
192function logGpuProbeFailure(
193 encoder: ConcreteGpuEncoder,
194 result: {
195 code?: number | null;
196 error?: Error;
197 signal?: NodeJS.Signals | null;
198 stderr?: string;
199 timedOut?: boolean;
200 },
201): void {
202 if (!isGpuProbeDebugEnabled()) return;
203 if (result.code === 0 && !result.error && !result.timedOut) return;
204
205 const reason = result.error
206 ? result.error.message
207 : result.timedOut
208 ? `timed out after ${GPU_PROBE_TIMEOUT_MS}ms`
209 : `exit=${String(result.code)} signal=${String(result.signal ?? "")}`;
210 const stderr = result.stderr?.trim();
211 console.warn(`[gpuEncoder] ${encoder} probe failed: ${reason}${stderr ? `\n${stderr}` : ""}`);
212}
213
214function isGpuProbeDebugEnabled(): boolean {
215 const value = process.env.HYPERFRAMES_DEBUG_GPU_PROBE;

Callers 1

canUseGpuEncoderFunction · 0.85

Calls 2

isGpuProbeDebugEnabledFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected