Skip to content

Fix #142: AMD GPU detection on Windows - #156

Merged
Michael-A-Kuykendall merged 2 commits into
mainfrom
fix/issue-142-amd-gpu-detection
Dec 8, 2025
Merged

Fix #142: AMD GPU detection on Windows#156
Michael-A-Kuykendall merged 2 commits into
mainfrom
fix/issue-142-amd-gpu-detection

Conversation

@Michael-A-Kuykendall

Copy link
Copy Markdown
Owner

Fixes AMD GPU detection issue on Windows where GPUs were detected by clinfo but all layers were assigned to CPU instead of GPU.

Root Cause: GPU backend environment variables (GGML_OPENCL, GGML_VULKAN, GGML_CUDA) were not set before llama.cpp backend initialization.

Changes:

  • Added method to set appropriate GGML_* environment variables for each GPU backend
  • Fixed GPU layer assignment by ensuring environment variables are set before backend initialization
  • Added comprehensive regression tests in
  • Fixed compiler warnings with documented attributes for conditionally-used MoeConfig fields

Testing: All 6 release gates pass with zero warnings. Regression tests verify environment variable configuration for all GPU backends.

Issue: #142

- Add configure_gpu_environment() method to set GGML_* environment variables before backend initialization
- Fix GPU layer assignment by ensuring OpenCL/Vulkan/CUDA backends have proper environment setup
- Add comprehensive regression tests for all GPU backend environment configuration
- Fix compiler warnings with documented #[allow(dead_code)] attributes for conditionally-used MoeConfig fields

Root cause: GPU backends require environment variables set before llama.cpp initialization.
AMD GPUs detected by clinfo but layers assigned to CPU due to missing GGML_OPENCL/GGML_VULKAN variables.

Tests: All 6 release gates pass with zero warnings. Regression tests added for GPU backend validation.
- Prefix unused variables with underscores to suppress warnings
- Variables are conditionally used based on feature flags
@Michael-A-Kuykendall
Michael-A-Kuykendall merged commit 18bff58 into main Dec 8, 2025
2 of 4 checks passed
Michael-A-Kuykendall added a commit that referenced this pull request Dec 19, 2025
* Fix #142: AMD GPU detection on Windows

- Add configure_gpu_environment() method to set GGML_* environment variables before backend initialization
- Fix GPU layer assignment by ensuring OpenCL/Vulkan/CUDA backends have proper environment setup
- Add comprehensive regression tests for all GPU backend environment configuration
- Fix compiler warnings with documented #[allow(dead_code)] attributes for conditionally-used MoeConfig fields

Root cause: GPU backends require environment variables set before llama.cpp initialization.
AMD GPUs detected by clinfo but layers assigned to CPU due to missing GGML_OPENCL/GGML_VULKAN variables.

Tests: All 6 release gates pass with zero warnings. Regression tests added for GPU backend validation.

* Fix compiler warnings in issue 142 regression test

- Prefix unused variables with underscores to suppress warnings
- Variables are conditionally used based on feature flags
@Michael-A-Kuykendall
Michael-A-Kuykendall deleted the fix/issue-142-amd-gpu-detection branch May 26, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant