Skip to content

Fix the hip free error in the ctest and samples#249

Merged
kiritigowda merged 13 commits intoROCm:developfrom
essamROCm:ea/BugFix_HIP_Free_Error
Oct 9, 2025
Merged

Fix the hip free error in the ctest and samples#249
kiritigowda merged 13 commits intoROCm:developfrom
essamROCm:ea/BugFix_HIP_Free_Error

Conversation

@essamROCm
Copy link
Copy Markdown
Contributor

Motivation

Fix the HIP Free error seen in the ctest and ffmpeg samples

Technical Details

Specifying the host mem type for ffmpeg host cpu decoding

Test Plan

ctest passes, samples were tested

Copy link
Copy Markdown
Contributor

@rrawther rrawther left a comment

Choose a reason for hiding this comment

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

Please add enum for mem_types for better readability

@essamROCm
Copy link
Copy Markdown
Contributor Author

The CI check should pass in this PR, the fix addresses the failure that used to happen in ctest and cause the CI build to exit.

@essamROCm
Copy link
Copy Markdown
Contributor Author

Please add enum for mem_types for better readability

I added enum(s) for all mem_types in the latest commit.

@essamROCm essamROCm requested a review from rrawther October 6, 2025 16:33
@kiritigowda
Copy link
Copy Markdown
Collaborator

@essamROCm failing CI

The following tests FAILED:
	  2 - rocpydecode_test_decodercpu (Timeout)
	 12 - video_decode_python_ffmpeg (Subprocess aborted)
	 13 - all_other_decoder_apis (Timeout)
Errors while running CTest
script returned exit code 8

@kiritigowda
Copy link
Copy Markdown
Collaborator

12: Test command: /usr/bin/python3.10 "/opt/rocm-7.1.0/lib/pyRocVideoDecode/samples/rocdecode/videodecode_cpu_backend.py" "-i" "/opt/rocm-7.1.0/share/rocdecode/video/AMD_driving_virtual_20-H264.mp4" "-resize" "640" "360"
12: Working Directory: /root/test
12: Environment variables: 
12:  PYTHONPATH=/opt/rocm-7.1.0/lib:$PYTHONPATH
12: Test timeout computed to be: 1500
12: Memory access fault by GPU node-1 (Agent handle: 0x5b5a621abb20) on address 0x72273fd02000. Reason: Page not present or supervisor privilege.
1/1 Test #12: video_decode_python_ffmpeg .......Subprocess aborted***Exception:   4.71 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   4.71 sec

The following tests FAILED:
	 12 - video_decode_python_ffmpeg (Subprocess aborted)

@kiritigowda
Copy link
Copy Markdown
Collaborator

Passing Azure CI -

Test project /home/user/_work/1/rocm/share/rocpydecode/tests
      Start  1: rocpydecode_test_decoders
 1/12 Test  #1: rocpydecode_test_decoders ........   Passed    0.95 sec
      Start  2: rocpydecode_test_decodercpu
 2/12 Test  #2: rocpydecode_test_decodercpu ......   Passed    0.60 sec
      Start  3: rocpydecode_test_demuxer
 3/12 Test  #3: rocpydecode_test_demuxer .........   Passed    0.26 sec
      Start  4: rocpydecode_test_types
 4/12 Test  #4: rocpydecode_test_types ...........   Passed    0.07 sec
      Start  5: video_decode_python_H265
 5/12 Test  #5: video_decode_python_H265 .........   Passed    1.82 sec
      Start  6: video_decode_perf_python_H265
 6/12 Test  #6: video_decode_perf_python_H265 ....   Passed    5.16 sec
      Start  7: video_decode_rgb_python_H265
 7/12 Test  #7: video_decode_rgb_python_H265 .....   Passed    1.82 sec
      Start  8: video_decode_python_H264
 8/12 Test  #8: video_decode_python_H264 .........   Passed    1.71 sec
      Start  9: video_decode_perf_python_H264
 9/12 Test  #9: video_decode_perf_python_H264 ....   Passed    3.62 sec
      Start 10: video_decode_python_AV1
10/12 Test #10: video_decode_python_AV1 ..........   Passed    0.38 sec
      Start 11: video_decode_python_AV9
11/12 Test #11: video_decode_python_AV9 ..........   Passed    1.90 sec
      Start 12: video_decode_python_ffmpeg
12/12 Test #12: video_decode_python_ffmpeg .......   Passed    1.24 sec

100% tests passed, 0 tests failed out of 12

Total Test time (real) =  19.53 sec

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/rocdecode/roc_pydecode_test.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #249      +/-   ##
===========================================
+ Coverage    42.85%   43.28%   +0.44%     
===========================================
  Files           12       12              
  Lines         1202     1213      +11     
===========================================
+ Hits           515      525      +10     
- Misses         687      688       +1     
Files with missing lines Coverage Δ
src/rocdecode/roc_pydecode.cpp 86.76% <100.00%> (+1.05%) ⬆️
src/rocdecode/roc_pyvideodecode.cpp 74.60% <100.00%> (ø)
src/rocdecode/roc_pyvideodecodecpu.cpp 10.11% <100.00%> (ø)
src/rocdecode/roc_pyvideodecodecpu.h 0.00% <ø> (ø)
src/rocdecode/roc_pydecode_test.cpp 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@rrawther rrawther left a comment

Choose a reason for hiding this comment

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

Added some comments

@essamROCm essamROCm requested a review from rrawther October 9, 2025 00:56
@kiritigowda kiritigowda merged commit 1c5a83e into ROCm:develop Oct 9, 2025
10 checks passed
jharryma pushed a commit that referenced this pull request Oct 10, 2025
* ROCm 7.1 - updates and fixes to changelog (#252)

* [Ex CI] Enable PipelineRepoRef parameter (#251)

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

* [Ex CI] Added Ref to repositories (#254)

* Bugfix -  hip free error in the ctest and samples (#249)

* Fix the hip free error in the ctest and samples

* Change all mem types values to meaningful ENUM

* Print GPU info when GPU is used only

* Correct sample params remove resize add mem type HOST

* Comment the testjpegbatched for now till we debug its root cause of failure

* Comment all_other_decoder_apis test for now till we debug its root cause of failure

* Comment rocpydecode_test_decodercpu test for now till we debug its root cause of failure

* Comment the ffmpeg for now till we debug its root cause of failure

* Comment the ffmpeg torch for now till we debug its root cause of failure

* Replacing mem_type values with enum

* Setup - Adding numpy as prerequisite (#248)

* Adding numpy as requirment for tests and samples

* Added numpy changes to the change log

---------

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

---------

Co-authored-by: amd-hsivasun <hsivasun@amd.com>
Co-authored-by: essamROCm <77812857+essamROCm@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.

4 participants