Skip to main content
← AI Engine
Core Pillar

GPU sharing with your game renderer

Hardware-level GPU scheduling lets AI inference share the GPU with your game. Zero frame drops, no separate GPU needed.

The Problem

Games use 90–100% of the GPU for rendering. Every existing AI inference tool (Ollama, llama.cpp, vLLM) assumes exclusive GPU access. Running AI alongside a game causes OS-level GPU context switching, which means frame drops: 45–55 FPS instead of 60.

Developers are forced to choose: cloud (latency), CPU (slow), or frame drops (unacceptable).

How the Compute Graphics Scheduler Works

The Atelico Compute Graphics Scheduler (CGS) schedules inference and rendering on a single shared hardware context instead of letting the OS context-switch between them. The result: AI inference runs alongside your game with minimal frame-time impact.

Diagram: graphics queue and inference kernels share a single CGS context on one GPU.

Measured on a Windows 11 + RTX 5080 host running the engine's D3D12 CGS demo with Llama 3.2 3B (Q4_K_M) generating tokens during render. The heavy scene is San Miguel (~10M triangles) at 4K, tuned to ~123 FPS without inference.

Game FPS on San Miguel at 4K, RTX 5080, with Llama 3.2 3B generating tokens during render. Game only 123 FPS (baseline); Atelico CGS PrioritizeGraphics 122 FPS (+0.0 ms/frame); Balance 121 FPS (+0.1 ms/frame); PrioritizeCompute 115 FPS (+0.6 ms/frame); a separate CUDA context collapses to 3 FPS (+284 ms/frame).

Without CGS, every CUDA submission forces the WDDM driver to context-switch away from the D3D12 graphics queue and back, collapsing the render loop from 123 FPS to 3 FPS. With CGS enabled, the inference kernels share the renderer's hardware scheduling context: the frame-time cost stays under 0.1 ms in the graphics-priority and balanced modes, and under 0.6 ms even in PrioritizeCompute, the mode that deliberately favors AI throughput. No other inference tool shares the GPU with a game renderer like this.

Three Scheduling Modes

Supported Hardware

CGS is implemented for every hardware backend the engine supports. Each platform uses the best available scheduling mechanism for that hardware:

Integration

Set the scheduling mode with a single call. The engine detects the hardware and selects the best scheduling backend automatically.

// Set GPU scheduling priority
Atelico.SetGpuPriority(GpuPriority.Balance);

// AI inference now shares the GPU with your renderer
string response = await Atelico.Chat(
    "What should I do next?",
    "You are a helpful NPC."
);

Related