GPU Runtime Troubleshooting
This page is the shortest practical workflow for the common runtime problem:
“Gollek starts, but GPU acceleration is missing, slow, or clearly using the wrong device.”
It connects the three main diagnostic layers:
- native library installation
- platform auto-detection
- device placement and responsibility
See also:
- GPU Runtime Docs
- Kernel Auto-Detection Guide
- Native Library Management Guide
- Device Placement Quick Reference
Fast Decision Tree
If the process fails to start because a native library cannot be found or loaded:
If the process starts, but Gollek chooses CPU instead of the GPU you expected:
If the process reports a GPU platform, but placement still looks wrong or slow:
If you are on Apple Silicon and safetensor/libtorch output still behaves unexpectedly:
Step 1: Verify Native Libraries
Start here when Gollek cannot load backend libraries, or when GPU backends are missing entirely.
Use the install and verify path from Native Library Management Guide:
make -f Makefile.native install-native-libs
make -f Makefile.native verify-libs
If needed, confirm the standard location layout under ~/.gollek/libs/.
Typical symptoms this step addresses:
.dylib/.sonot found- backend classes available but runtime native libraries missing
- macOS quarantine and dependency-resolution issues
If this step fails, stay in the native-library guide until the runtime can at least see the expected backend libraries.
Step 2: Check Platform Auto-Detection
Once native libraries exist, verify how Gollek is choosing the platform.
Use Kernel Auto-Detection Guide to confirm:
- detection priority order
- supported override flags
- CPU fallback behavior
Questions to answer here:
- should this machine prefer Metal, CUDA, ROCm, or CPU?
- is GPU acceleration disabled by an override?
- is Gollek falling back to CPU because the GPU backend is actually unavailable?
If the chosen platform is wrong, fix this layer before going deeper into device placement.
Step 3: Check Device Placement
If the platform selection looks correct but inference still behaves like CPU or moves tensors to the wrong place, switch to Device Placement Quick Reference.
That page is the fastest place to confirm:
- which layer decides placement
- what the expected logs should look like
- what “correct” Metal placement looks like versus CPU fallback
Typical symptoms this step addresses:
- logs say
cpuwhen you expectedmps - inference runs, but performance is much slower than expected
- provider/device combinations look inconsistent
Step 4: Debug Apple Silicon Placement Boundaries
If you are specifically on Apple Silicon, the next useful layer is:
Use these when the issue is no longer:
- “can the runtime see the GPU?”
and has become:
- “which layer is actually responsible for this placement decision?”
That is the right level for bugs involving:
- MPS vs CPU movement
- safetensor/libtorch bridge expectations
- ownership of placement decisions between orchestration and backend layers
Common Failure Patterns
Library problem
Symptoms:
- startup failure
- native symbol/load error
- backend never becomes available
Primary page:
Detection problem
Symptoms:
- runtime chooses CPU when a GPU should be available
- override flags or environment variables appear ignored
Primary page:
Placement problem
Symptoms:
- platform says GPU, but logs still show CPU placement
- performance looks like fallback behavior
Primary pages:
Ownership/architecture problem
Symptoms:
- you need to know whether the bug belongs in orchestration, runner, or backend
- placement behavior is technically working, but responsibility is unclear
Primary page:
Suggested Reading Order
For most runtime failures, this order is the most efficient:
- Native Library Management Guide
- Kernel Auto-Detection Guide
- Device Placement Quick Reference
- Metal GPU Device Placement
- Device Responsibility Architecture
When To Stop Here
If you can now answer these three questions, you are probably back in a healthy state:
- are the required native libraries installed and loadable?
- which platform is Gollek selecting, and why?
- which layer is responsible for the final device placement?
If not, go back to GPU Runtime Docs and pick the narrower page for the layer that still looks wrong.