Texture memory seem to be deprecated in CUDA 11.0, what's the correct alternative?

The code base I am maintaining uses texture memory. I recently updated CUDA from 10.2 to 11.0 and realized that texture memory seem to be deprecated.

The documentation here https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TEXTURE.html confirms that as well.

My problem is I couldn’t find a description anywhere on how I am suppose to update the code base. Is there an new equivalent of texture memory introduced in CUDA 11.0? Or do I have to rewrite the code and convert the texture memory to global memory?

What has been deprecated are texture and surface references. About ten years ago, texture and surface objects were introduced into CUDA as superior replacements.

The importance of textures in CUDA has certainly declined over the years. In early CUDA, textures were often needed for efficient memory access. The modernization and generalization of the GPU memory subsystem introduced with compute capabilities 3.0 and 5.0, followed by further refinement in subsequent architectures, has made such use of textures largely unnecessary.

1 Like