cuda.core.Kernel#
- class cuda.core.Kernel(*args, **kwargs)#
Represent a compiled kernel that had been loaded onto the device.
Kernel instances can execution when passed directly into the
launch()function.Directly creating a
Kernelis not supported, and they should instead be created through aObjectCodeobject.Methods
- __init__()#
- static from_handle(
- handle: int,
- mod: ObjectCode = None,
Creates a new
Kernelobject from a foreign kernel handle.Uses a CUfunction or CUkernel pointer address to create a new
Kernelobject.- Parameters:
handle (int) – Kernel handle representing the address of a foreign kernel object (CUfunction or CUkernel).
mod (
ObjectCode, optional) – The ObjectCode object associated with this kernel. If not provided, a placeholder ObjectCode will be created. Note that without a proper ObjectCode, certain operations may be limited.
Attributes
- property attributes: KernelAttributes#
Get the read-only attributes of this kernel.
- property occupancy: KernelOccupancy#
Get the occupancy information for launching this kernel.