GstCuda.CudaContext¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
Set the GPU device to use for operations |
||
r/w |
The initial stack size for GPU threads |
||
r |
External resource interop API support |
||
r |
Whether OS specific handle is supported via virtual memory |
||
r/w |
Prefers stream ordered allocation |
||
r |
Device supports stream ordered allocation |
||
r |
Whether virtual memory management is supporte or not |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
object |
r |
Class Details¶
- class GstCuda.CudaContext(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Added in version 1.22.
- classmethod find_dxgi_adapter_luid(cuda_device)¶
- Parameters:
cuda_device (
int) – a CUDA device index- Returns:
The DXGI adapter LUID or 0 if not found or on non-Windows platforms
- Return type:
Finds the DXGI adapter LUID corresponding to the given CUDA device. This is useful for matching CUDA devices with Direct3D adapters on Windows.
Added in version 1.28.2.
- classmethod new(device_id)¶
- Parameters:
device_id (
int) – device-id for creatingGstCuda.CudaContext- Returns:
a new
GstCuda.CudaContextorNoneon failure- Return type:
Create
GstCuda.CudaContextwith given device_idAdded in version 1.22.
- classmethod new_wrapped(handler, device)¶
- Parameters:
- Returns:
A newly created
GstCuda.CudaContext- Return type:
Note: The caller is responsible for ensuring that the CUcontext and CUdevice represented by handle and device stay alive while the returned
GstCuda.CudaContextis active.Added in version 1.22.
- classmethod pop(cuda_ctx)¶
-
Pops the current CUDA context from CPU thread
Added in version 1.22.
- can_access_peer(peer)¶
- Parameters:
peer (
GstCuda.CudaContext) – aGstCuda.CudaContext- Returns:
Trueif self can access peer directly- Return type:
Query whether self can access any memory which belongs to peer directly.
Added in version 1.22.
- get_handle()¶
-
Get CUDA device context. Caller must not modify and/or destroy returned device context.
Added in version 1.22.
- get_texture_alignment()¶
- Returns:
the
CUcontextof self- Return type:
Get required texture alignment by device
Added in version 1.22.
- push()¶
-
Pushes the given self onto the CPU thread’s stack of current contexts. The specified context becomes the CPU thread’s current context, so all CUDA functions that operate on the current context are affected.
Added in version 1.22.
Property Details¶
- GstCuda.CudaContext.props.cuda_device_id¶
- Name:
cuda-device-id- Type:
- Default Value:
0- Flags:
Set the GPU device to use for operations
- GstCuda.CudaContext.props.default_gpu_stack_size¶
-
The default stack size for each GPU thread.
Added in version 1.26.
- GstCuda.CudaContext.props.external_resource_interop¶
-
External resource interop API support
Added in version 1.26.
- GstCuda.CudaContext.props.os_handle¶
-
OS handle supportability in virtual memory management
Added in version 1.24.
- GstCuda.CudaContext.props.prefer_stream_ordered_alloc¶
-
Prefers stream ordered allocation
Added in version 1.26.
- GstCuda.CudaContext.props.stream_ordered_alloc¶
-
Device supports stream ordered allocation
Added in version 1.26.