rocAL Fused Crop decoding support using rocJpeg#368
rocAL Fused Crop decoding support using rocJpeg#368kiritigowda merged 101 commits intoROCm:developfrom
Conversation
Add changes in CMake
…eg_integration2
Comment out print statements
…jan28/rocAL into fg/rocjpeg_crop_decoder
| ROCDEC_VIDEO_DECODE = 5, //!< for video decoding using HW via rocDecode | ||
| AUDIO_SOFTWARE_DECODE = 6, //!< Uses sndfile to decode audio files | ||
| ROCJPEG_DEC = 7 //!< rocJpeg hardware decoder for decoding jpeg files | ||
| ROCJPEG_DEC = 7, //!< rocJpeg hardware decoder for decoding jpeg files |
There was a problem hiding this comment.
please rename to ROCJPEG for consistency
There was a problem hiding this comment.
Will issue in a separate PR
rrawther
left a comment
There was a problem hiding this comment.
Please address the review comments
|
@rrawther I have addressed other PR comments. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for fused crop decoding using the rocJpeg hardware decoder, specifically targeted for Resnet50 training workloads. The implementation introduces a new rocJpeg fused crop decoder class and integrates decoder type selection across the C++ and Python APIs.
- Introduces
FusedCropRocJpegDecoderclass andROCJPEG_CROPPEDdecoder type for hardware-accelerated crop decoding - Adds
RocalDecoderTypeparameter to partial loader APIs to allow decoder selection between TurboJPEG and rocJpeg - Fixes stride calculation bug in rocJpeg decoder when images in the batch require scaling
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/cpp_api/unit_tests/unit_tests.cpp |
Updates test case 14 to use appropriate decoder based on GPU backend |
rocAL_pybind/amd/rocal/decoders.py |
Adds device parameter and decoder type selection logic to image_slice function |
rocAL/source/loaders/image/image_read_and_decode.cpp |
Extends decoder support and adds crop window handling for ROCJPEG_CROPPED type |
rocAL/source/decoders/image/rocjpeg_fused_crop_decoder.cpp |
New implementation of fused crop decoder using rocJpeg hardware |
rocAL/source/decoders/image/rocjpeg_decoder.cpp |
Moves shared utility functions to header and fixes stride calculation bug |
rocAL/source/decoders/image/decoder_factory.cpp |
Adds factory support for ROCJPEG_CROPPED decoder type |
rocAL/source/api/rocal_api_data_loaders.cpp |
Updates API functions to accept and handle decoder type parameter |
rocAL/include/decoders/image/rocjpeg_fused_crop_decoder.h |
Header file defining the new fused crop decoder class interface |
rocAL/include/decoders/image/rocjpeg_decoder.h |
Moves utility functions to header as inline functions and adds rescaling flag |
rocAL/include/decoders/image/decoder.h |
Adds ROCJPEG_CROPPED enum value and removes duplicate includes |
rocAL/include/api/rocal_api_data_loaders.h |
Updates API signatures to include decoder type parameter |
docs/examples/notebooks/decoder_examples.ipynb |
Updates documentation to mention rocJPEG hardware decoder usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| _actual_decoded_width[i] = decoded_width; | ||
| _actual_decoded_height[i] = decoded_height; | ||
|
|
||
| if (_rocjpeg_decoder->is_partial_decoder()) { |
There was a problem hiding this comment.
I also think, is_cropped_decoder is better name than is_partial_decoder (please change when changing decoder enums)
rrawther
left a comment
There was a problem hiding this comment.
I am approving this PR assuming the review comments for name changes will be done as a separate PR
|
@fiona-gladwin : Can you please resolve all conversations so we can merge this PR |
@rrawther For the other comments wrt enum name change will issue a follow up PR. All comments are addressed |
Motivation
Technical Details
Test Plan
C++ Unit reader test case 14 - with GPU backend
Test added as part of testAllScript.sh