cupy.cuda.texture.TextureReference

class cupy.cuda.texture.TextureReference(size_t texref, ResourceDescriptor ResDesc, TextureDescriptor TexDesc)

A class that holds a texture reference. Equivalent to CUtexref (the driver API is used under the hood).

Parameters:
  • texref (size_t) – a handle to the texture reference declared in the CUDA source code. This can be obtained by calling get_texref().
  • ResDesc (ResourceDescriptor) – an intance of the resource descriptor.
  • TexDesc (TextureDescriptor) – an instance of the texture descriptor.

Warning

As of CUDA Toolkit v10.1, the Texture Reference API (in both driver and runtime) is marked as deprecated. To help transition to the new Texture Object API, this class mimics the usage of TextureObject. Users who have legacy CUDA codes that use texture references should consider migration to the new API.

This CuPy interface is subject to removal once the offcial NVIDIA support is dropped in the future.

Methods

Attributes

ResDesc
TexDesc
texref