Skip to content

Conversation

@fiona-gladwin
Copy link
Contributor

Motivation

Add support to deserialize rocAL pipelines by reconstructing the pipeline operators and their arguments from protobuf definitions in the master graph.

Technical Details

  • Adds deserialize_args_from_protobuf() method to reconstruct operator arguments from protobuf format, handling various types.
  • Implemented deserialize() method in MasterGraph to reconstruct the entire pipeline from protobuf definitions, including loaders, augmentation nodes, and their connections
  • Added helper methods (create_operator_output(), add_node() overload) to support tensor and node creation during deserialization

Test Plan

No new tests added. Must pass existing tests

NOTE : To be merged after PR #432

fiona-gladwin and others added 30 commits October 16, 2025 07:15
Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@fgladwin fgladwin requested a review from Copilot January 12, 2026 09:34
Copy link
Contributor

Copilot AI left a 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.

@LakshmiKumar23 LakshmiKumar23 self-requested a review January 20, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants