Isolate unloadable LINML_EP_LIBRARIES plugins; move TensorRT-RTX to 0.5.0 (1.7.1)

Merged
TO
10d ago
+522-121

Summary

Two changes, in separate commits:

1. A plugin library in LINML_EP_LIBRARIES that won't load no longer breaks unrelated commands (2f9ebdb)

On a host with the MIGraphX plugin vendored but no ROCm (libmigraphx_c.so.3 missing), source scripts/env-gpu-deps.sh mapped MIGraphX anyway. Every CLI command (providers list, doctor, run, serve, bench) then died with an unhandled ArgumentException from ProviderArgs.EnsureEpLibrariesRegistered, and 35 tests in LinML.Cli.Tests failed.

  • env-gpu-deps.sh adds the vendored MIGraphX plugin only when libmigraphx_c.so.3 is found (LD_LIBRARY_PATH or the ldconfig cache). When it isn't, it removes the vendored mapping an earlier source left behind. A MIGraphX mapping set to another path is kept.
  • New ProviderArgs.RegisterEpLibraries registers libraries one at a time. A library given with --ep-library, or the one for the requested provider, still fails fast. Any other library that fails to load is skipped with a warning on stderr and is not passed on to session creation. Used by providers list, doctor, run, serve and bench. This also fixes run --provider cpu, which crashed on the same broken MIGraphX entry.
  • run/serve --require-provider and provider selection failures now use doctor's rule (new ProviderUnavailableHint). A provider the host lacks the hardware or architecture for is reported as not applicable, with no linml catalog install hint. The install hint remains for a plugin that could run here but isn't installed. This fixes ExitCodeTests.Run_MissingRequiredPlugin_Returns3_WithInstallHint, which failed on main whenever MIGraphX was vendored. The test now passes whether or not it is.
  • zsh: the stale TRT-RTX/OpenVINO cleanup in env-gpu-deps.sh split LINML_EP_LIBRARIES with IFS, which zsh doesn't do. Sourced from zsh, it could drop unrelated mappings. It now takes entries off one at a time with parameter expansion and gives the same result in bash and zsh.
  • ProviderArgsTests clears an inherited LINML_EP_LIBRARIES for each test, so the ResolveEpLibraries tests pass in a shell that sourced the env script.

2. Stock TensorRT-RTX pin moves to 0.5.0 (TensorRT-RTX 1.7.1) (8ca833d)

  • trt-rtx pins onnxruntime-ep-nv-tensorrt-rtx-cu13 0.5.0 on x86_64 and aarch64, which bundles TensorRT-RTX 1.7.1. ABI and minimum ORT are unchanged. 1.6.1 engine caches are rebuilt.
  • The wheel records no version, so the new PluginPackageSpec.VersionMarkerFile uses the bundled libtensorrt_rtx.so.1.7.1 to mark the pinned build. A 0.4.0 install in the same directory is replaced, by both the installer and fetch-ep-plugins.sh.
  • The SONAME links follow whichever runtime version is installed instead of a hardcoded 1.6.1.
  • The patched WSL2 build stays at 0.4.0-wsl2p2.

CHANGELOG entries for both are included (706f6b0).

Testing

  • dotnet test: 382/382 pass with no env, and 382/382 with scripts/env-gpu-deps.sh sourced. Before: 1 failure with no env, 35 with it sourced (LinML.Cli.Tests).
  • With the broken MIGraphX mapping forced back into LINML_EP_LIBRARIES: LinML.Cli.Tests 178/178. providers list and run --provider cpu warn and succeed. run --provider migraphx --require-provider exits 3 with the not-applicable message.
  • env-gpu-deps.sh sourced in both bash and zsh with: no ROCm, a fake libmigraphx_c.so.3 on the loader path, a stale vendored mapping, a custom MIGraphX mapping, stale TRT-RTX/openvino= mappings, empty entries.
  • Not verified here: the 0.5.0 wheel URLs/SHA256s against a real download (scripts/fetch-ep-plugins.sh trt-rtx), and the docs' claim that the WSL2 build runs on 1.7.1. The catalog tests use fake wheels.

šŸ¤– Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • TensorRT-RTX plugin packages are updated to version 0.5.0 with the 1.7.1 runtime on x86_64 and ARM64.
  • Bug Fixes
    • Unloadable optional plugins are skipped with a warning; explicitly requested plugins still report failures.
    • MIGraphX is registered only when ROCm and its runtime are detected, without removing custom mappings.
    • Provider requirements now report unsupported hardware or architecture as not applicable.
    • Plugin-mapping cleanup works in bash and zsh.
  • Documentation
    • Updated plugin versions, downloads, compatibility details, and runtime information.