OpenParable
Skip to content
← Back to skills

Validate runtime loading

Testing & Quality

Validate runtime loading is an Agent Skill for testing & quality published in the sandrohanea/whisper.net repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Use when changing runtime selection, RuntimeOptions, NativeLibraryLoader, runtime package imports, or examples that force runtime order.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/sandrohanea/whisper.net/blob/HEAD/.github/skills/validate-runtime-loading/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/validate-runtime-loading, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Validate runtime loading

Use this skill when a task changes runtime discovery or selection, including RuntimeOptions, RuntimeLibrary, NativeLibraryLoader, runtime targets, dependency checker behavior, or examples that set RuntimeOptions.RuntimeLibraryOrder.

Runtime surfaces to keep in sync

  • Whisper.net/LibraryLoader/RuntimeLibrary.cs
  • Whisper.net/LibraryLoader/RuntimeOptions.cs
  • Whisper.net/LibraryLoader/NativeLibraryLoader.cs
  • Whisper.net/LibraryLoader/CudaHelper.cs for CUDA-specific probing
  • tools/WhisperNetDependencyChecker/Program.cs
  • examples/MultiRuntime/Program.cs
  • README runtime package and runtime-order documentation
  • runtimes/*.nuspec and runtimes/*/*.targets when package layout changes

Current runtime order

The default order is:

Cuda, Cuda12, Vulkan, CoreML, OpenVino, Cpu, CpuNoAvx

Preserve this order unless the task intentionally changes runtime preference behavior. If the order changes, update XML docs and README text together.

Validation

With native artifacts present under runtimes/, run the dependency checker for each affected runtime:

dotnet run --project .\tools\WhisperNetDependencyChecker\WhisperNetDependencyChecker.csproj
dotnet run --project .\tools\WhisperNetDependencyChecker\WhisperNetDependencyChecker.csproj -- CpuNoAvx
dotnet run --project .\tools\WhisperNetDependencyChecker\WhisperNetDependencyChecker.csproj -- Cuda
dotnet run --project .\tools\WhisperNetDependencyChecker\WhisperNetDependencyChecker.csproj -- Cuda12
dotnet run --project .\tools\WhisperNetDependencyChecker\WhisperNetDependencyChecker.csproj -- Vulkan
dotnet run --project .\tools\WhisperNetDependencyChecker\WhisperNetDependencyChecker.csproj -- CoreML
dotnet run --project .\tools\WhisperNetDependencyChecker\WhisperNetDependencyChecker.csproj -- OpenVino

Then run the managed test suite:

dotnet test .\Whisper.net.slnx --logger "trx"

Only use the preview native libs shortcut when the change is managed-only and does not alter runtime package layout or native outputs.