Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3056 Discussions

Alder Lake hang when running sample_encode & sample_decode at same time.

simonshi
Beginner
2,151 Views

Hi,Intel developers:

     I have got a Alder Lake which model is 12600K. After installed mediasdk version 21.2.3 I try to run sample_decode & sample_encode at same time. I noticed when I first run sample_decode then run sample_encode the sample_decode proagram would be hang for about 20sec and sample_encode would report GPU hang at same time.

simonshi_0-1638258047826.pngsimonshi_1-1638258064879.png

    My cmd is as follwing:

     ./sample_decode -gpucopy::on h265 -i {input_url} -o /dev/null

    ./sample_encode h264 -i /tmp/yuv/1080_nv12.yuv -o output.h264 -w 1920 -h 1080 -dstw 1920 -dsth 1080 -hw -b 1000 -timeout 30

     My environment is as following:

     OS: ubuntu 20.04 desktop

     kernel: 5.16-rc1 

     mediasdk version: 21.2.3

  

Labels (2)
0 Kudos
9 Replies
JyothisV_Intel
Moderator
2,133 Views

Hi,

 

Thanks for posting in Intel Communities.

 

We tried running sample_decode and sample_encode simultaneously on video samples inside an Ubuntu 18.04 system at our end. The system has an Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz. The following are the similar commands that we used to do this:

 

./sample_decode -gpucopy::on h265 -i sample.h265 -o /dev/null
./sample_encode h264 -i sample.yuv -o sample.h264 -w 1920 -h 1080 -dstw 1920 -dsth 1080 -hw -b 1000 -timeout 30

 

Unfortunately, we were unable to replicate the issue from our end. Both the commands were working fine and no issues or errors were reported. To help you better, could you please provide us with sample video files that you used for both encoding and decoding so that we could try it from our end.

 

Regards,

Jyothis V James

 

0 Kudos
simonshi
Beginner
2,108 Views

Hi, James:

      I found this issue only on i5-12600K. I have also i7-9900K i7-10700K and i7-11700K those model did not have same issue.

      Could you use 12th gen cpu to do the tests? And I think the clip is good and normal I have checked is with Intel ViCue Video Codec Analyzer.

0 Kudos
JyothisV_Intel
Moderator
2,077 Views

Hi,

 

Thanks for confirming this information with us.

 

As per the official documentation of Intel Media SDK in the following links (https://www.intel.com/content/www/us/en/developer/tools/media-sdk/overview.html and https://github.com/Intel-Media-SDK/MediaSDK), Intel Media SDK do not support the newer 12th generation, Intel Alder Lake processors. This is because Intel Media SDK lifetime comes to an end in the form, it exists right now. All future development is planned to happen within the oneAPI Video Processing Library (called oneVPL). This library provides a single video processing API for encoding, decoding, and video processing that works across a wide range of accelerators. Its runtime implementations are direct successors of Intel Media SDK.

 

You can read more about Intel oneVPL, its documentation, usage, and samples from the below links:

https://www.intel.com/content/www/us/en/developer/tools/oneapi/onevpl.html

https://www.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/api-based-programming/intel-oneapi-video-processing-library-onevpl.html

https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneVPL/

 

Hope this would help. If this resolves your issue, make sure to accept this as a solution. This would help others with a similar issue.

 

Regards,

Jyothis V James

 

0 Kudos
simonshi
Beginner
2,038 Views

Hi,James:

     Thank you for your reply.I would try to use oneVPL now. I would update it after try it.

0 Kudos
JyothisV_Intel
Moderator
1,934 Views

Hi,


Good day to you.


I have not heard back from you. Did you face any issues while using oneVPL? If yes, do let us know.


Regards,

Jyothis V James


0 Kudos
simonshi
Beginner
1,917 Views

Hi, James:

    Sorry for late reply. First of all using oneVPL-2021.6.0 did not slove my issue.When I use sample_decode & sample_encode at same time decoder would hang for a while and encode report gpu hang.And I think I am using libmfxhw64_gen.so correctly.

image.png

     Then I got support from Intel chinese team, they help to disable MMC & HCP Scalability Decode features.After that it would not hang again but the performance of decoder & encoder is really much bad than 11700k. You can see the following picture the h264 encode 1080P with 10M has only 85 fps.

 

simonshi_0-1639454621175.png

       Could you help me to improve the performance of the gpu? I don't think that's the normal performance.

0 Kudos
JyothisV_Intel
Moderator
1,871 Views

Hi,


Thanks for getting back to us.


We are working on it internally and will get back to you with an update.


Regards,

Jyothis V James


0 Kudos
Dmitry_E_Intel
Employee
1,852 Views

Hi Simon,

 

I guess the issue is trending to be a lack of GPU copy, right? To confirm, can you please:

1) Run VPL version of sample_decode without file dumping and share fps. Without file dumping, decoder will operate with video memory directly without slow copy to system memory.

2) Run MSDK version of sample_decode with file dumping two times: 1) with  -gpucopy::on and 2) with  -gpucopy::off and also share fps.

 

Also, coming back to the original GPU hang issue: it's great that MMC and scalability off workarounded the problem but please try to request a proper fix from your Intel contact. Ideally, can you please submit an issue at https://github.com/intel/media-driver ?

 

Regards,

Dmitry

0 Kudos
simonshi
Beginner
1,837 Views

Hi Dmitry:

     I agreed with you about gpu_copy params.Using VPL the performance with gpucopy::on or off is same.

     1) Without -o performance by MSDK and VPL is as following:

     

simonshi_0-1639632737504.png

simonshi_1-1639632752542.png

    2)Using MSDK with gpucopy::on and off:

simonshi_2-1639633259524.png

   Then I have noticed if using gpucopy::on the Render/3D engines is busy by intel_gpu_top and it is not busy when using vpl no matter make gpucopy on or off.

 

 

0 Kudos
Reply