-
Notifications
You must be signed in to change notification settings - Fork 21
rocAL Deserialize PR 3 : MasterGraph changes #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…ocAL into fg/ser_argument
Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com>
Fg/enum register
Fg/ser argument
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…dwin/rocAL into fg/ser2_pipe_serialize
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds deserialization support to rocAL pipelines by introducing mechanisms to reconstruct pipeline operators and their arguments from protobuf definitions. The implementation enables restoring serialized pipelines back into executable form by recreating nodes, tensors, and their connections.
Changes:
- Implemented
deserialize_args_from_protobuf()to reconstruct operator arguments from protobuf, handling parameters, vectors, and various data types - Added
deserialize()method in MasterGraph to rebuild complete pipelines from protobuf definitions - Introduced NodeFactory with registration macros for dynamic node creation during deserialization
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| rocAL/include/pipeline/node_factory.h | New factory class for dynamic node registration and creation |
| rocAL/include/pipeline/enum_registry.h | Enhanced to support enum value lookup and conversion by type name |
| rocAL/include/pipeline/argument.h | Added get() template method for type-safe argument value retrieval |
| rocAL/source/pipeline/pipeline_serializer.cpp | Implemented deserialize_args_from_protobuf() for argument reconstruction |
| rocAL/source/pipeline/master_graph.cpp | Added deserialize() method and helper functions for pipeline reconstruction |
| rocAL/source/loaders/image/node_image_loader*.cpp | Added initialize_args() overrides and REGISTER_LOADER_NODE macros |
| rocAL/source/augmentations/color_augmentations/node_brightness.cpp | Added initialize_args() override and REGISTER_NODE macro |
| rocAL/include/pipeline/node.h | Added virtual methods for loader module access and argument initialization |
| rocAL/include/pipeline/master_graph.h | Added deserialize methods and pipeline_tensors map |
| rocAL/include/loaders/loader_module.h | Updated include path |
| rocAL/include/loaders//node_.h | Added override specifiers to get_loader_module() |
| rocAL_pybind/amd/rocal/pipeline.py | Updated docstring for serialize method |
| CHANGELOG.md | Updated to document deserialization changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Motivation
Add support to deserialize rocAL pipelines by reconstructing the pipeline operators and their arguments from protobuf definitions in the master graph.
Technical Details
Test Plan
No new tests added. Must pass existing tests
NOTE : To be merged after PR #432