Skip to content

Load ONNX Runtime privately per FMU to avoid version collisions (#53) - #55

Merged
micheleurbani merged 1 commit into
masterfrom
fix/issue-53-private-onnxruntime
Sep 29, 2026
Merged

micheleurbani merged 1 commit into
masterfrom
fix/issue-53-private-onnxruntime

Conversation

@micheleurbani

Copy link
Copy Markdown
Collaborator

Each FMU now ships its ONNX Runtime library renamed with the model name (e.g. libMyModel_onnxruntime.so) and loads it explicitly at runtime via dlopen/LoadLibraryEx instead of linking against the generic "onnxruntime" name. Previously, two FMUs built by onnx2fmu - or an FMU and an FMI importer that itself embeds ONNX Runtime - could each ship a different ONNX Runtime version under the same library filename; loading both into the same process risked the OS loader resolving to the wrong copy. The model binary's own dependency metadata no longer references ONNX Runtime at all.

Each FMU now ships its ONNX Runtime library renamed with the model
name (e.g. libMyModel_onnxruntime.so) and loads it explicitly at
runtime via dlopen/LoadLibraryEx instead of linking against the
generic "onnxruntime" name. Previously, two FMUs built by onnx2fmu -
or an FMU and an FMI importer that itself embeds ONNX Runtime - could
each ship a different ONNX Runtime version under the same library
filename; loading both into the same process risked the OS loader
resolving to the wrong copy. The model binary's own dependency
metadata no longer references ONNX Runtime at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Wo3W7S5avKuWtXqkNp5cq
@micheleurbani
micheleurbani merged commit c54c3d0 into master Sep 29, 2026
9 of 17 checks passed
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