[aoti-et] Store symbols from dlopen into AOTIDelegateHandle #15172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors how function pointers for AOTI model container operations are managed and loaded in the CUDA backend. Instead of relying on global/static function pointers, function pointers are now stored per-instance in the
AOTIDelegateHandlestructure. This change enables safe handling of multiple shared libraries within the same process and improves encapsulation and maintainability.Refactoring function pointer management:
aoti_model_container.cppandaoti_model_container.h, and moved them into theAOTIDelegateHandlestruct as per-instance members. [1] [2] [3]CUDA backend updates:
cuda_backend.cpp) to load function pointers into eachAOTIDelegateHandleinstance using a newload_function_pointers_into_handlemethod, replacing the previous global symbol registration logic. All calls to model container functions now use the handle's member function pointers. [1] [2] [3] [4] [5]Build system adjustments:
aoti_model_container.cppfrom the build targets and library sources, as global function pointer definitions are no longer needed. [1] [2]