Skip to content

Warning fixes for HIP Backend#484

Merged
r-abishek merged 3 commits intor-abishek:ar/build_fix_hip_warningsfrom
Srihari-mcw:warning_fixes_hip
Sep 3, 2025
Merged

Warning fixes for HIP Backend#484
r-abishek merged 3 commits intor-abishek:ar/build_fix_hip_warningsfrom
Srihari-mcw:warning_fixes_hip

Conversation

@Srihari-mcw
Copy link
Copy Markdown
Collaborator

@Srihari-mcw Srihari-mcw commented Aug 28, 2025

  • Contains warning fixes for the HIP Backend build
  • Adds CHECK_RETURN_STATUS for the various hip API calls

@r-abishek r-abishek changed the base branch from develop to ar/build_fix_hip_warnings September 3, 2025 06:03
@r-abishek r-abishek requested a review from Copilot September 3, 2025 06:03
Copy link
Copy Markdown

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 CHECK_RETURN_STATUS macro wrapping around HIP API calls to catch and handle errors in the HIP backend build. The changes ensure proper error checking for GPU memory operations and synchronization calls that were previously being invoked without status validation.

  • Wraps hipMemset, hipMemcpy, hipStreamSynchronize, and similar HIP API calls with CHECK_RETURN_STATUS
  • Adds error checking for device initialization and property queries
  • Ensures memory operations and stream synchronization calls are properly validated

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/modules/tensor/rppt_tensor_effects_augmentations.cpp Adds error checking for hipMemset and hipStreamSynchronize calls in gridmask and pixelate operations
src/modules/tensor/hip/kernel/to_decibels.cpp Wraps hipStreamSynchronize calls with error checking
src/modules/tensor/hip/kernel/tensor_sum.cpp Adds error checking for hipMemsetAsync and hipStreamSynchronize operations
src/modules/tensor/hip/kernel/tensor_stddev.cpp Wraps hipMemsetAsync calls with error checking
src/modules/tensor/hip/kernel/tensor_min.cpp Adds error checking for hipMemsetAsync and hipStreamSynchronize operations
src/modules/tensor/hip/kernel/tensor_mean.cpp Wraps hipMemsetAsync calls with error checking
src/modules/tensor/hip/kernel/tensor_max.cpp Adds error checking for hipMemsetAsync and hipStreamSynchronize operations
src/modules/tensor/hip/kernel/slice.cpp Wraps hipStreamSynchronize call with error checking
src/modules/tensor/hip/kernel/resize_mirror_normalize.cpp Adds error checking for hipMemsetAsync and hipStreamSynchronize calls
src/modules/tensor/hip/kernel/normalize.cpp Wraps hipMemsetAsync and hipStreamSynchronize calls with error checking
src/modules/tensor/hip/kernel/noise_gaussian.cpp Adds error checking for hipMemcpy call
src/modules/tensor/hip/kernel/erase.cpp Wraps hipMemcpyAsync and hipStreamSynchronize calls with error checking
src/modules/tensor/hip/kernel/crop_and_patch.cpp Adds error checking for hipMemcpyAsync and hipStreamSynchronize operations
src/modules/legacy_dep/hip/kernel/snow.cpp Wraps hipMemcpy call with error checking
src/modules/handle_hip.cpp Adds error checking for hipInit, hipEventElapsedTime, and hipGetDeviceProperties calls
src/include/common/rppi_validate.hpp Wraps all hipMemcpy calls with error checking

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@r-abishek r-abishek added the buildfix Fix for build label Sep 3, 2025
Copy link
Copy Markdown
Owner

@r-abishek r-abishek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@r-abishek r-abishek merged commit 6be2348 into r-abishek:ar/build_fix_hip_warnings Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildfix Fix for build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants