cuda.core.texture.SurfaceObject#
- class cuda.core.texture.SurfaceObject(*args, **kwargs)#
A bindless surface handle for kernel-side typed load/store.
Wraps
cuSurfObjectCreate. Unlike aTextureObject, a surface has no sampling state (no filtering, no addressing modes, no normalization); kernels read and write through it using integer pixel coordinates.The backing
OpaqueArraymust have been created withis_surface_load_store=Trueand is kept alive for the lifetime of this object to prevent dangling handles.Construct via
cuda.core.Device.create_surface_object(). Passes to kernels as a 64-bit handle (via thehandleproperty).Methods
- __init__(*args, **kwargs)#
- close(self)#
Release this object’s reference to the underlying
CUsurfObject.Destruction (
cuSurfObjectDestroy) and release of the backing array happen via the handle’s deleter when the last reference is dropped. Idempotent.
Attributes
- device#
- handle#
The underlying
CUsurfObjectas an integer (64-bit kernel arg).
- resource#
The
ResourceDescriptorthis surface was built from.