Skip to content

Windows compiled CLI bundles skip sibling lib backend modules #525

Description

@leehack

Reproduction

A clean dart build cli validation bundle places llamadart-validate.exe in bin/ and native DLLs in sibling lib/. On Windows Server 2022 with an NVIDIA L4 and driver 582.53, both Gemma 4 and Qwen3.5 GGUF CPU/CUDA runs fail model load with:

llama_model_load_from_file_impl: no backends are loaded

The live bundle source was 89097b704fbfe90718484cd577076e7a5cb7083d, native v0.4.1. Model hashes and bundle files were verified. Fresh-guest TLS trust was repaired separately; the error above occurs after model preparation. VC runtime DLLs and the Vulkan loader are present.

Deterministic cause

resolveWindowsBackendModuleDirectory checks executable-adjacent modules, CWD, .dart_tool/lib and hook caches, then falls back to bin/. It does not inspect the standard sibling lib/. _tryLoadBackendModuleIfBundled consequently skips CPU/CUDA modules because it checks the wrong directory.

An independent model-free probe reproduces the wrong directory selection. A new regression using a valid sibling lib and an unrelated valid CWD failed before the proposed fix.

Fix and validation

A narrow fix in draft #515 recognizes validated bin/../lib, retaining explicit override and executable-adjacent precedence. Negative coverage rejects partial directories and preserves fallback. The 129 service tests pass; independent review and rebuilt Windows execution are being completed. This finding does not establish a GPU capability limitation, and fixing discovery does not yet prove all native dependencies or inference paths work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:P1Act next: current correctness, contract, or repository-integrity risk

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions