Artificial Intelligence Computing Leadership from NVIDIA
NVENC Encoding inside of a virtual machine
Hi, Is it possible to use the NVENC API inside of a virtual machine using GRID? If this is possible how many encodes can be preformed with K1/K2 cards? Does it depend on the selected vGPU profile? Thanks, Daniel
Hi,

Is it possible to use the NVENC API inside of a virtual machine using GRID?
If this is possible how many encodes can be preformed with K1/K2 cards?
Does it depend on the selected vGPU profile?

Thanks,

Daniel

#1
Posted 05/05/2015 04:20 PM   
Yes it is possible and it's not limited by the vGPU profile. The number of streams is dependent on the resolution, frame rate etc. You can find card specifications here http://www.nvidia.com/object/grid-technology.html
Yes it is possible and it's not limited by the vGPU profile.

The number of streams is dependent on the resolution, frame rate etc. You can find card specifications here


http://www.nvidia.com/object/grid-technology.html

Jason Southern, Regional Lead for ProVis Sales - EMEA: NVIDIA Ltd.

#2
Posted 05/05/2015 04:43 PM   
Hello Jason_Southern This question is actual again after GRID 2.0 release. We bought some Tesla m60 cards for Linux vGPU vms. Is it possible to use NVENC on Linux virtual machine with vGPU? Currently I have error related to "Failed to create CUDA context (101)". Does it mean that NVENC for Linux require CUDA support? Is it possible to use NVENC without CUDA? (for example using opengl buffers?) Thank you. Alex
Hello Jason_Southern

This question is actual again after GRID 2.0 release. We bought some Tesla m60 cards for Linux vGPU vms.

Is it possible to use NVENC on Linux virtual machine with vGPU?
Currently I have error related to "Failed to create CUDA context (101)". Does it mean that NVENC for Linux require CUDA support? Is it possible to use NVENC without CUDA? (for example using opengl buffers?)

Thank you.

Alex

thank you for help, Alexander.

#3
Posted 12/07/2015 06:44 AM   
[quote="verybigbadboy"] Is it possible to use NVENC on Linux virtual machine with vGPU? [/quote] Yes. [quote="verybigbadboy"] Currently I have error related to "Failed to create CUDA context (101)". Does it mean that NVENC for Linux require CUDA support? Is it possible to use NVENC without CUDA? (for example using opengl buffers?) [/quote] You will either need to use an 8GB vGPU profile, the only one which supports CUDA at present. Or write the code to not use CUDA buffers. The NVENC SDK is the best place for details on how to use it. https://developer.nvidia.com/nvidia-video-codec-sdk
verybigbadboy said:

Is it possible to use NVENC on Linux virtual machine with vGPU?


Yes.

verybigbadboy said:
Currently I have error related to "Failed to create CUDA context (101)". Does it mean that NVENC for Linux require CUDA support? Is it possible to use NVENC without CUDA? (for example using opengl buffers?)


You will either need to use an 8GB vGPU profile, the only one which supports CUDA at present. Or write the code to not use CUDA buffers.

The NVENC SDK is the best place for details on how to use it.


https://developer.nvidia.com/nvidia-video-codec-sdk

Jason Southern, Regional Lead for ProVis Sales - EMEA: NVIDIA Ltd.

#4
Posted 12/08/2015 01:18 PM   
Hello Jason [quote="Jason_Southern"] You will either need to use an 8GB vGPU profile, the only one which supports CUDA at present. [/quote] This option is not acceptable for us. it is too expensive to use whole GPU just for Linux vm. [quote="Jason_Southern"] Or write the code to not use CUDA buffers. The NVENC SDK is the best place for details on how to use it. [/quote] Yes, I know. Let me explain my issue related to NVENC: First, every NVENC API call require "void * encoder" object. This object can be created only by nvEncOpenEncodeSessionEx function. But nvEncOpenEncodeSessionEx function require to provide me "pointer to CUDA device" or "pointer to Direct X device". My develop/target platform is Linux. Microsoft is not implemented Direct X for Linux yet :). So it is only one option to use NVENC for Linux - it is CUDA device. But CUDA is disabled for vGPU. How can I use NVENC encoder using Linux vGPU vm? May be there any other way? Is it possible to use NVENC without CUDA? Thank you. NvEncOpenEncodeSessionEx documentation from NVENC header file. [code] // NvEncOpenEncodeSessionEx /** * \brief Opens an encoding session. * * Opens an encoding session and returns a pointer to the encoder interface in * the \p **encoder parameter. The client should start encoding process by calling * this API first. * The client must pass a pointer to IDirect3DDevice9/CUDA interface in the \p *device parameter. * If the creation of encoder session fails, the client must call ::NvEncDestroyEncoder API * before exiting. * * \param [in] openSessionExParams * Pointer to a ::NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS structure. * \param [out] encoder * Encode Session pointer to the NvEncodeAPI interface. [/code]
Hello Jason

Jason_Southern said:
You will either need to use an 8GB vGPU profile, the only one which supports CUDA at present.


This option is not acceptable for us. it is too expensive to use whole GPU just for Linux vm.


Jason_Southern said:
Or write the code to not use CUDA buffers.
The NVENC SDK is the best place for details on how to use it.


Yes, I know.
Let me explain my issue related to NVENC:

First, every NVENC API call require "void * encoder" object. This object can be created only by nvEncOpenEncodeSessionEx function.
But nvEncOpenEncodeSessionEx function require to provide me "pointer to CUDA device" or "pointer to Direct X device".
My develop/target platform is Linux. Microsoft is not implemented Direct X for Linux yet :).

So it is only one option to use NVENC for Linux - it is CUDA device. But CUDA is disabled for vGPU.

How can I use NVENC encoder using Linux vGPU vm? May be there any other way? Is it possible to use NVENC without CUDA?

Thank you.

NvEncOpenEncodeSessionEx documentation from NVENC header file.
// NvEncOpenEncodeSessionEx
/**
* \brief Opens an encoding session.
*
* Opens an encoding session and returns a pointer to the encoder interface in
* the \p **encoder parameter. The client should start encoding process by calling
* this API first.
* The client must pass a pointer to IDirect3DDevice9/CUDA interface in the \p *device parameter.
* If the creation of encoder session fails, the client must call ::NvEncDestroyEncoder API
* before exiting.
*
* \param [in] openSessionExParams
* Pointer to a ::NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS structure.
* \param [out] encoder
* Encode Session pointer to the NvEncodeAPI interface.

thank you for help, Alexander.

#5
Posted 12/08/2015 08:04 PM   
Try the DevTalk forum - https://devtalk.nvidia.com/ It is possible to use NVENC without CUDA as there are several ISV's doing this today for applications that are being deployed via vGPU.
Try the DevTalk forum - https://devtalk.nvidia.com/


It is possible to use NVENC without CUDA as there are several ISV's doing this today for applications that are being deployed via vGPU.

Jason Southern, Regional Lead for ProVis Sales - EMEA: NVIDIA Ltd.

#6
Posted 12/09/2015 02:59 PM   
Hello Jason Thank you for your advice. I posted my question on devtalk forum. I tried to find any public service(streaming/remote app) with Linux vGPU support, but no services available now. Do you know any service(ISV) which is already using Linux vGPU? Could you provide link please? (if it possible) Grid K1 + passthough is best Linux solution for video encoding now. :(
Hello Jason

Thank you for your advice. I posted my question on devtalk forum.

I tried to find any public service(streaming/remote app) with Linux vGPU support, but no services available now.
Do you know any service(ISV) which is already using Linux vGPU? Could you provide link please? (if it possible)

Grid K1 + passthough is best Linux solution for video encoding now. :(

thank you for help, Alexander.

#7
Posted 12/18/2015 01:23 PM   
Scroll To Top

Add Reply