Skip to content

fix: Windows Vulkan runtime dependencies - #1046

Merged
ndizazzo merged 5 commits into
codex/issue-653-mi300-utilizationfrom
codex/issue-1022-windows-vulkan
Jul 22, 2026
Merged

fix: Windows Vulkan runtime dependencies#1046
ndizazzo merged 5 commits into
codex/issue-653-mi300-utilizationfrom
codex/issue-1022-windows-vulkan

Conversation

@ndizazzo

@ndizazzo ndizazzo commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • resolve the full non-system PE DLL dependency closure when packaging Windows Vulkan native runtimes
  • load installed Windows runtime DLLs with sibling dependency lookup enabled
  • verify packaged Vulkan dependency closure and exercise RX 9070 XT GPU enumeration
  • run the resolver in Windows Vulkan CI when packaging inputs change

Root cause

The Windows Vulkan artifact manifest listed llama.cpp runtime DLLs but omitted transitive MinGW dependencies imported by ggml-vulkan.dll. Windows also loaded the primary DLL without searching its installed runtime directory for sibling dependencies, so startup failed before Vulkan device enumeration and the system reported zero GPUs.

Validation

  • Python dependency resolver unit/integration suite
  • Windows MSVC cross-target check for skippy-ffi dynamic loading
  • focused skippy-ffi and mesh-llm-system checks, Clippy, and tests
  • just test-all

Stacked on #1039 as requested.

Closes #1022

Summary by CodeRabbit

  • New Features
    • Improved Windows Vulkan native-runtime packaging by collecting and ordering required DLL dependencies.
    • Added Windows-native runtime dependency verification during artifact checks.
  • Bug Fixes
    • CI change detection for Windows GPU builds now covers additional native-runtime packaging inputs and runs Vulkan-only dependency validation.
  • Improvements
    • Enhanced dynamic runtime library loading on Windows for absolute-path DLLs.
  • Tests
    • Added unit tests for Vulkan runtime-selectable GPU facts and comprehensive Windows native-runtime dependency discovery/verification.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eab0533b-cba4-4a82-905e-687d28c11883

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds Windows Vulkan DLL dependency collection and verification for native runtime packages, uses Windows-specific dynamic library loading, validates Vulkan GPU facts, and runs dependency tests in Windows GPU CI.

Changes

Windows Vulkan runtime support

Layer / File(s) Summary
PE dependency resolution
scripts/windows-native-runtime-deps.py
Parses PE imports, filters host DLLs, discovers search paths, collects recursive dependencies, verifies closure, and exposes collect and verify commands.
Packaging and artifact verification
scripts/package-native-runtime.sh, scripts/verify-native-runtime-package.sh, scripts/tests/test_windows_native_runtime_deps.py
Packages Windows Vulkan dependencies, verifies artifact contents, and tests parsing, collection, missing dependencies, and end-to-end verification.
Runtime loading and GPU facts
crates/skippy-ffi/..., crates/mesh-llm-system/src/hardware/skippy_devices.rs
Loads Windows DLLs with altered dependency search behavior and tests Vulkan backend device fact mapping.
GPU CI path filters and tests
.github/actions/compute-changes/action.yml, .github/workflows/ci.yml, .github/workflows/pr_builds.yml
Updates Windows GPU path detection and runs native runtime dependency tests in Vulkan CI jobs.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PackageScript
  participant DependencyResolver
  participant RuntimeArtifact
  participant ArtifactVerifier
  PackageScript->>DependencyResolver: collect DLL dependencies
  DependencyResolver->>RuntimeArtifact: copy resolved DLLs
  PackageScript->>RuntimeArtifact: write manifest with staged libraries
  ArtifactVerifier->>DependencyResolver: verify artifact dependencies
  DependencyResolver-->>ArtifactVerifier: return validation result
Loading

Possibly related PRs

  • Mesh-LLM/mesh-llm#873: Extends native runtime artifact verification with platform-specific dependency checks.

Suggested reviewers: michaelneale

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address #1022 by packaging missing Windows Vulkan DLL dependencies, improving DLL loading, and adding Vulkan GPU/runtime validation.
Out of Scope Changes check ✅ Passed The added CI, packaging, loader, and test changes all support the Windows Vulkan runtime dependency fix and are not clearly unrelated.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing Windows Vulkan runtime dependency loading and packaging.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue-1022-windows-vulkan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ndizazzo
ndizazzo marked this pull request as ready for review July 21, 2026 19:51
@ndizazzo

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request is currently a draft. Reviews will not take place until the PR is marked as ready for review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/pr_builds.yml (1)

126-129: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove or wire this duplicate windows_gpu filter.

changes.outputs.windows_gpu is sourced from steps.compute.outputs.windows_gpu_build_required (Line 38), not steps.filter.outputs.windows_gpu; these entries are currently dead configuration and can drift from .github/actions/compute-changes/action.yml.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr_builds.yml around lines 126 - 129, Remove the duplicate
windows_gpu-related path entries from the filter configuration in the workflow,
since changes.outputs.windows_gpu uses
compute.outputs.windows_gpu_build_required rather than
filter.outputs.windows_gpu. Keep the authoritative change detection aligned with
the compute-changes action and remove only the dead configuration entries.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/actions/compute-changes/action.yml:
- Line 291: The Windows GPU routing filters omit changes to the routing action
itself. Update WINDOWS_GPU_INPUTS in .github/actions/compute-changes/action.yml
at lines 291-291 to include that action path, and update both the windows_gpu
and rust filters in .github/workflows/ci.yml at lines 143-146 so the job
condition triggers Windows GPU validation for routing-action changes.

---

Nitpick comments:
In @.github/workflows/pr_builds.yml:
- Around line 126-129: Remove the duplicate windows_gpu-related path entries
from the filter configuration in the workflow, since changes.outputs.windows_gpu
uses compute.outputs.windows_gpu_build_required rather than
filter.outputs.windows_gpu. Keep the authoritative change detection aligned with
the compute-changes action and remove only the dead configuration entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 977af892-437a-4097-aafd-675fe9594d89

📥 Commits

Reviewing files that changed from the base of the PR and between 4e101fb and 95b8bc2.

📒 Files selected for processing (10)
  • .github/actions/compute-changes/action.yml
  • .github/workflows/ci.yml
  • .github/workflows/pr_builds.yml
  • crates/mesh-llm-system/src/hardware/skippy_devices.rs
  • crates/skippy-ffi/src/dynamic_library.rs
  • crates/skippy-ffi/src/lib.rs
  • scripts/package-native-runtime.sh
  • scripts/tests/test_windows_native_runtime_deps.py
  • scripts/verify-native-runtime-package.sh
  • scripts/windows-native-runtime-deps.py

Comment thread .github/actions/compute-changes/action.yml Outdated
@ndizazzo

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ndizazzo

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/tests/test_windows_native_runtime_deps.py`:
- Around line 109-114: Update the verifier invocation in the test flow to
resolve bash with shutil.which("bash") before calling subprocess.run. Fail
clearly when no executable path is found, and pass the resolved bash path
instead of the literal command name while preserving the existing VERIFY_SCRIPT
and artifact arguments.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8ef7b84d-af82-462d-aacd-2939af9e52d1

📥 Commits

Reviewing files that changed from the base of the PR and between de68692 and c307af5.

📒 Files selected for processing (1)
  • scripts/tests/test_windows_native_runtime_deps.py

Comment thread scripts/tests/test_windows_native_runtime_deps.py
@ndizazzo

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ndizazzo
ndizazzo force-pushed the codex/issue-1022-windows-vulkan branch from 992d475 to 2e64d15 Compare July 21, 2026 20:41
@ndizazzo
ndizazzo changed the base branch from codex/issue-651-rocm-gpu-enumeration to codex/issue-653-mi300-utilization July 21, 2026 20:41
@ndizazzo ndizazzo changed the title Fix Windows Vulkan runtime dependencies fix: Windows Vulkan runtime dependencies Jul 21, 2026
@ndizazzo
ndizazzo force-pushed the codex/issue-1022-windows-vulkan branch from 2e64d15 to 5817676 Compare July 22, 2026 00:07
@ndizazzo
ndizazzo merged commit cf2d6ad into main Jul 22, 2026
29 checks passed
@ndizazzo
ndizazzo deleted the codex/issue-1022-windows-vulkan branch July 22, 2026 01:21
michaelneale added a commit that referenced this pull request Jul 22, 2026
…ngram

* origin/main:
  Add GLM DSA correctness trace reporting (#1033)
  Add GLM DSA package contract validation (#1032)
  Add direct quant layer package tooling (#1031)
  Lock split topology placement (#1050)
  fix nightly stability Qwen thinking
  ui(data-mode): migrate legacy harness storage to v2 (#1040)
  fix: Windows Vulkan runtime dependencies (#1046)
  test: validate MI300 runtime selection and placement (#1045)
  fix: support ROCm RDNA APU kernels safely (#1044)
  fix: ROCm GPU enumeration (#1039)
  Document public packaging installation channels
  Fix Windows autoupdate import (#1030)
  Update llama.cpp upstream pin
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.

Windows Vulkan runtime omits dependencies and reports 0 GPUs on RX 9070 XT

2 participants