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.
3075 Discussions

H.264 Encoder reports MFX_ERR_DEVICE_FAILED occasionally under dual-GPU configuration

lu__yin
Beginner
771 Views

Hi,

Recently I wrote a C++ software to do h264 hardware encoding by using Intel Media SDK 2018R2, with my dual-GPU (Windows 10 1809 + Intel HD Graphics 4600 + Nvidia GTX1080) equipped desktop.

When I used the GTX1080 as my primary gfx device and tried to use the headless intel's GPU as secondary hw-accelerated device, everything is fine until about ten minutes later. The call of MFXVideoSession::SyncOperation() in my program begun to return MFX_ERR_DEVICE_FAILED occasionally, which lead to crash. But when I used Intel's GPU as the primary device, it works pretty well. There is no more MFX_ERR_DEVICE_FAILED errors, no matter how long it runs.

How to avoid this MFX_ERR_DEVICE_FAILED situation and make my secondary intel's gpu work stable? Any suggestion would be appreciated.

 

Best regards,

0 Kudos
3 Replies
Mark_L_Intel1
Moderator
771 Views

Hi Yin,

The switching between multiple graphic devices could be tricky, you can refer to Appendix D of the developer reference guide.

Let me know if this helps.

Mark

0 Kudos
lu__yin
Beginner
771 Views

Hi Mark,

Thanks for your suggestion.

I have read the Appendix D carefully. By following descriptions I noted that from an application’s perspective, the MFX_ERR_DEVICE_FAILED situation which I mentioned above is completely out-of-my control, if I didn’t set the GPU’s affinity MANUALLY beforehand. The only thing I can do is to accept it and reinitialize the whole things from the bottom-up…

During decoding, video processing, and encoding operations, if the application is not in the Intel graphic device affinity list, the previously accessible Intel graphic device may become inaccessible due to a switch event. The SDK functions will return MFX_ERR_DEVICE_LOST or MFX_ERR_DEVICE_FAILED, depending on when the switch occurs and what stage the SDK functions operate. The application needs to handle these errors and exits gracefully.

Is my understanding of this correct? I also observed that the sample of decoding in msdk would fail occasionally because of MFX_ERR_DEVICE_FAILED errors without explicit intel’s GPU affinity setting.

 

Best regards,

0 Kudos
Mark_L_Intel1
Moderator
771 Views

I think so, to set the GPU's affinity MANUALLY should like the description of following web page:

https://www.tenforums.com/tutorials/103965-set-preferred-gpu-apps-windows-10-a.html

We understand this is a good solution but this seems depending on OS. 

Let me know if you have any suggestions.

Mark

0 Kudos
Reply