GstCuda.CudaContext¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
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:
New in version 1.22.
- classmethod new(device_id)¶
- Parameters:
device_id (
int
) – device-id for creatingGstCuda.CudaContext
- Returns:
a new
GstCuda.CudaContext
orNone
on failure- Return type:
Create
GstCuda.CudaContext
with given device_idNew 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.CudaContext
is active.New in version 1.22.
- classmethod pop(cuda_ctx)¶
-
Pops the current CUDA context from CPU thread
New in version 1.22.
- can_access_peer(peer)¶
- Parameters:
peer (
GstCuda.CudaContext
) – aGstCuda.CudaContext
- Returns:
True
if self can access peer directly- Return type:
Query whether self can access any memory which belongs to peer directly.
New in version 1.22.
- get_handle()¶
-
Get CUDA device context. Caller must not modify and/or destroy returned device context.
New in version 1.22.
- get_texture_alignment()¶
- Returns:
the
CUcontext
of self- Return type:
Get required texture alignment by device
New 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.
New 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.
New in version 1.26.
- GstCuda.CudaContext.props.external_resource_interop¶
-
External resource interop API support
New in version 1.26.
- GstCuda.CudaContext.props.os_handle¶
-
OS handle supportability in virtual memory management
New in version 1.24.
- GstCuda.CudaContext.props.prefer_stream_ordered_alloc¶
-
Prefers stream ordered allocation
New in version 1.26.
- GstCuda.CudaContext.props.stream_ordered_alloc¶
-
Device supports stream ordered allocation
New in version 1.26.