NGX Sample Test Issues

Hi there!

I have an issue with the NGX SDK which I just downloaded.

I just got a brand new 2080TI today, have installed:

  • Cuda 10.1.105,
  • Nvidia Creator Drivers 419.67
  • NGX_SDK_EA1.exe

Built the samples with Visual Studio 2017, Windows SDK Version: 10.0.17134.0

No issue in building the samples, but then when I try to run for example the slomo.exe sample, I get:

PS C:\test> slomo --constqp 23 --frames 2 --input “out.mp4” --output “out_slomo.mp4” --wd ‘C:\test’

NVIDIA NGX Video SloMo Sample
[INFO ][14:44:16] Media format: QuickTime / MOV (mov,mp4,m4a,3gp,3g2,mj2)
Session Initialization Time: 38 ms
NGX Failure: -1160773631 In function, CNGXSloMo::InitializeSloMo In file, c:\programdata\nvidia corporation\nvidia ngx sdk\samples\ngx samples\ngx slomo\cngxslomo.h at line, 97
Session Deinitialization Time: 21 ms

It also creates an empty output file.

I’ve seen that if I mistype the input, it loads, echoes “NVIDIA NGX Video SloMo Sample” and exits.

What can be the issue? It seems to behave the same on multiple videos.

From GPUs perspective I have:

GPU0 - Intel Iris Graphics
GPU1 - My laptop’s dedicated Nvidia 1050TI
GPU2 - The new RTX 2080TI, connected via an eGPU - It’s also the main one (the one through which I drive the display)

Unfortunately, the SloMo sample does not properly handle this multi-GPU scenario. The sample by default uses CUDA device 0, which in this case is the unsupported 1050Ti. We have filed on RFE to fix this issue in the next release of the SDK.

Meanwhile, you can fix this, by adding the following line of code

CK_CUDA(cudaSetDevice(1));

in main() ahead of these two lines of code.

CK_CUDA(cudaFree(0));
CK_CUDA_DRV_API(cuCtxGetCurrent(&cuContext));

You can always verify the CUDA device enumeration by running the following command

C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe -L

The output will look something like this:

C:\Program Files\NVIDIA Corporation\NVSMI>nvidia-smi.exe -L
GPU 0: Quadro RTX 8000 (UUID: GPU-1413bcf8-d520-6352-4480-3864cf75cce9)
GPU 1: Quadro RTX 8000 (UUID: GPU-753ae552-5ae9-cfbb-38de-80a6f1bc34e3)

Thanks, but unfortunately it didn’t solve my issues :’(

I’ve added:

std::cout << "\Setting CUDA Device to 1" << std::endl;
CK_CUDA(cudaSetDevice(1));

CK_CUDA(cudaFree(0));
CK_CUDA_DRV_API(cuCtxGetCurrent(&cuContext));

cudaSetDevice before cudaFree

nvidia-smi looks like this:

PS C:\test> & 'C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe' -L
GPU 0: GeForce GTX 1050 (UUID: GPU-bde2a9a0-4e30-5bb7-a131-95c438e827a2)
GPU 1: GeForce RTX 2080 Ti (UUID: GPU-78777454-fea9-adef-cb28-9212d1c7ccda)

Output when I’m running SloMo looks like this:

PS C:\test> slomo --constqp 23 --frames 2 --input .\out.mp4 --output .\out_slomo.mp4 --wd C:\test\

NVIDIA NGX Video SloMo Sample
Setting CUDA Device to 1
[INFO ][10:59:37] Media format: QuickTime / MOV (mov,mp4,m4a,3gp,3g2,mj2)
Session Initialization Time: 28 ms
NGX Failure:  -1160773631 In function, CNGXSloMo::InitializeSloMo In file, c:\programdata\nvidia corporation\nvidia ngx sdk\samples\ngx samples\ngx slomo\cngxslomo.h at line, 97
Session Deinitialization Time: 10 ms

OK. Something is still broken.

We will need to debug this. Please give

Our apologies.

Do you need any extra info from me?

Sorry for the delay, I was out of the office last week.

If you add this code:

int device = 0;
cudaDeviceProp props = { 0 };
CK_CUDA(cudaGetDeviceProperties(&props, device));

When device is set to 0 and the 1, in each case what is props.name?

The CUDA GPU order may be different than the order returned from NVSMI. The CUDA driver should make device 0 the “most capable” CUDA device, which in your case should be the 2080Ti, but since I do not have your exact config, I’m would like to verify that.

Thanks!

Yup, you’re right, Device 0 is indeed the 2080TI

NVIDIA NGX Video SloMo Sample
Setting CUDA Device to 0
GeForce RTX 2080 Ti
[INFO ][11:36:57] Media format: QuickTime / MOV (mov,mp4,m4a,3gp,3g2,mj2)
Session Initialization Time: 38 ms
NGX Failure: -1160773631 In function, CNGXSloMo::InitializeSloMo In file, c:\programdata\nvidia corporation\nvidia ngx sdk\samples\ngx samples\ngx slomo\cngxslomo.h at line, 97
Session Deinitialization Time: 19 ms
PS C:\test> slomo --constqp 23 --frames 2 --input .\out.mp4 --output .\out_slomo.mp4 --wd C:\test\

NVIDIA NGX Video SloMo Sample
Setting CUDA Device to 1
GeForce GTX 1050
[INFO ][14:38:46] Media format: QuickTime / MOV (mov,mp4,m4a,3gp,3g2,mj2)
Session Initialization Time: 31 ms
NGX Failure: -1160773631 In function, CNGXSloMo::InitializeSloMo In file, c:\programdata\nvidia corporation\nvidia ngx sdk\samples\ngx samples\ngx slomo\cngxslomo.h at line, 97
Session Deinitialization Time: 12 ms
PS C:\test>

Thanks for the additional info. We need to setup a repro here with an eGPU system.

Hey @VideoGuru, I’ve managed to get around the issue with a pretty easy and lame fix. Just went to Device Manager and disabled my 1050 graphics card. And now it works :D

Hi VideoGuru,

I have two RTX 4000 and tried to run ‘NVIDIA NGX Video SloMo Sample’.
FYI, the version of NGX SDK is 1.1.
The test results were as follows:

  1. test by adding the code of CK_CUDA(cudaSetDevice(0))
    ==> The sample worked.

  2. test by adding the code of CK_CUDA(cudaSetDevice(1))
    ==> The sample did not work.
    In my opinion, the color-conversion worked but ‘Slomo engine’ did not seem to work.

Best regards,
Jinsuk