Skip to content

Add example for multi channel dataloader#415

Merged
kiritigowda merged 10 commits intoROCm:developfrom
SundarRajan28:update_numpy_reader_example
Dec 4, 2025
Merged

Add example for multi channel dataloader#415
kiritigowda merged 10 commits intoROCm:developfrom
SundarRajan28:update_numpy_reader_example

Conversation

@SundarRajan28
Copy link
Copy Markdown
Contributor

@SundarRajan28 SundarRajan28 commented Nov 11, 2025

Motivation

Adds a new python example showcasing a rocAL dataloader which reads multi channel input data and performs augmentations on the inputs

Example for #413

Technical Details

Test Plan

Test Result

Submission Checklist

Copy link
Copy Markdown
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 a new example demonstrating a rocAL dataloader for multi-channel input data processing, specifically mimicking the Deepcam training dataset pipeline. The example shows how to read numpy arrays with 16 channels, apply normalization, and perform tensor layout transformations.

  • Adds a PyTorch-compatible dataloader example for multi-channel (16 channels) data
  • Demonstrates numpy reader with normalization and transposition operations
  • Creates dummy input data to simulate Deepcam dataset shape (768x1152x16)
Comments suppressed due to low confidence (1)

tests/python_api/pytorch_deepcam_loader.py:21

  • Import of 'random' is not used.
import random

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

SundarRajan98 and others added 2 commits November 21, 2025 12:25
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kiritigowda kiritigowda merged commit 37f98ac into ROCm:develop Dec 4, 2025
8 checks passed
JeniferC99 pushed a commit that referenced this pull request Jan 22, 2026
* Docs - updated the toc (#406)

* rocAL Serialize PR 1- Introduce EnumRegistry (#398)

* Use enums present in commons.h

Remove the usage of API enums in internal node files

* Remove unused include rocal_api_types.h

* Introduce EnumRegistry

Add support to register all internal enums

* Remove redundant static cast

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove semicolon for enum macro

* Modify name of macro

* Change enums to scoped enums in commons.h

* Minor fix

* Remove unused includes

* Add compiler keywords

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CMakeLists version for rocAL

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fiona Gladwin <121928245+fgladwin@users.noreply.github.com>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* HIP - Set HIP device in output routine thread (#407)

* Adding hipSetDevice in output routine thread

* Remove whitespace

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Sundar Rajan Vaithiyanathan <svaithiy@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

* rocAL Serialize PR 2 : Introduce Argument class (#400)

* Use enums present in commons.h

Remove the usage of API enums in internal node files

* Remove unused include rocal_api_types.h

* Introduce EnumRegistry

Add support to register all internal enums

* Introduce Argument class

Creates an argument instance for each arg passed in the Node
Handles different argument types i.e parameters, vectors, enums and predefined types

* Remove redundant static cast

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove semicolon for enum macro

* Modify name of macro

* Change enums to scoped enums in commons.h

* Code reorganization

Create single constructor with check for different data types in Argument class

* Minor fix

* Remove unused includes

* Add compiler keywords

* Update rocAL/include/pipeline/argument.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update rocAL/include/pipeline/argument.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Minor change

* Update rocAL/include/pipeline/argument.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update rocAL/include/pipeline/argument.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Minor change

* Fix shared pointer fetching

* Minor fix

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CMakeLists version for rocAL

* Update CHANGELOG

* Minor change

* Update CHANGELOG.md

Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com>

* Add const correctness to get args list

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fiona Gladwin <121928245+fgladwin@users.noreply.github.com>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

* Docs - removed opencl and added hip (#408)

Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

* Enable Lintian Support rocAL (#403)

* fix lintian errors

* remove overrides install, fix formatting

* fix readme error

* removing docs/README.md

---------

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* Docs - Bump rocm-docs-core[api_reference] from 1.27.0 to 1.29.0 in /docs/sphinx (#416)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.27.0 to 1.29.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.27.0...v1.29.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-version: 1.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Docs - readding the readme (#417)

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* Bug fixes - HIP (#409)

* Fix bug in CropResize node

* Use HIP mem for fused crop rocjpeg decoder

* Fix bug with ROI updation in numpy loader

* Resolve review comments

---------

Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>

* Docs - Bump rocm-docs-core[api_reference] from 1.29.0 to 1.30.0 in /docs/sphinx (#418)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.29.0...v1.30.0)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-version: 1.30.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Docs - Bump rocm-docs-core[api_reference] from 1.30.0 to 1.30.1 in /docs/sphinx (#423)

Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.30.0 to 1.30.1.
- [Release notes](https://github.com/ROCm/rocm-docs-core/releases)
- [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md)
- [Commits](ROCm/rocm-docs-core@v1.30.0...v1.30.1)

---
updated-dependencies:
- dependency-name: rocm-docs-core[api_reference]
  dependency-version: 1.30.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* rocAL Serialize PR 3 : Introduce PipelineOperator class  (#401)

* Use enums present in commons.h

Remove the usage of API enums in internal node files

* Remove unused include rocal_api_types.h

* Introduce EnumRegistry

Add support to register all internal enums

* Introduce Argument class

Creates an argument instance for each arg passed in the Node
Handles different argument types i.e parameters, vectors, enums and predefined types

* Introduce PipelineOperator class

* Add support to create and return node name and tensor name

* Add support in MasterGraph to store details of PipelineOperators

* Add support to store the argument details in the node for brightness and ImageLoaderNode

* Remove redundant static cast

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove semicolon for enum macro

* Modify name of macro

* Change enums to scoped enums in commons.h

* Code reorganization

Create single constructor with check for different data types in Argument class

* Minor fix

* Remove unused includes

* Add compiler keywords

* Update rocAL/include/pipeline/argument.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update rocAL/include/pipeline/argument.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Minor change

* Update rocAL/include/pipeline/argument.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update rocAL/include/pipeline/argument.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Minor change

* Fix shared pointer fetching

* Minor fix

* Minor fix

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CMakeLists version for rocAL

* Update CHANGELOG

* Update CHANGELOG.md

* Minor change

* Minor changes

* Update CHANGELOG.md

Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com>

* Add const qualifier

* Add const correctness to get args list

* Minor change

* Add const correctness to get args list

* Update CHANGELOG

* Generate UID for tensors from MasterGraph

* Minor change

* Resolve copilot review comments

* Minor change

* Minor changes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fiona Gladwin <121928245+fgladwin@users.noreply.github.com>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>

* CMakeLists - Update GPU targets (#421)

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>

* multi channel dataloader - example/sample (#415)

* Update numpy reader example

* Add new example and remove changes from other example

* Update comment

* Remove unused import

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Resolve review comments

---------

Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Sundar Rajan Vaithiyanathan <svaithiy@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Docs - Update CHANGELOG.md (#424)

* Update CHANGELOG.md

Updates for 7.2

* Changelog - bugfixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fiona Gladwin <121928245+fgladwin@users.noreply.github.com>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Sundar Rajan Vaithiyanathan <svaithiy@amd.com>
Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
Co-authored-by: jonatluu <jonatluu@amd.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

8 participants