1

The references show little differences between them, only about types used and errors returned.

cuTexObjectCreate vs cudaCreateTextureObject

I have the feeling that the former was introduced first (even though both are for compute capability 3.0) but it was never deprecated (cuda 11.3).

Which one should I use ?

Soleil
  • 6,404
  • 5
  • 41
  • 61
  • 1
    One is a runtime API function and the other is a driver API function...... – talonmies Apr 26 '21 at 13:06
  • 1
    @talonmies Well, as I posted, the difference is not clear; they do the same thing and the api calls end up going through the driver don't they ? – Soleil Apr 26 '21 at 13:13
  • 1
    They are two different APIs. Use whichever one comes from the API you are using, obviously – talonmies Apr 26 '21 at 13:15
  • 1
    https://stackoverflow.com/questions/242894/cuda-driver-api-vs-cuda-runtime – Robert Crovella Apr 26 '21 at 13:30
  • 1
    I think your question is basically "what is the difference between the CUDA driver API and the CUDA runtime API", in which case I believe your question is basically a duplicate of the the one I linked. See also [this](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#driver-api) – Robert Crovella Apr 26 '21 at 14:24
  • @RobertCrovella Many thanks for the links. I was merely focused on texture object creation, not the driver/runtime api. I see that using one or the other has upsides and downsides. The driver version is interesting for more verbose errors. I'm not sure the driver api is still an advantage when using multithread context (https://stackoverflow.com/a/2519998/1447389). – Soleil Apr 26 '21 at 15:30
  • A general question about how the driver API and runtime API differ is far too broad for a SO question. It seemed evident that at the beginning of this question you were simply unaware that the dichotomy even existed. With an understanding that they are two different methods for doing roughly the same thing (CUDA), the remaining differences between these two specific API calls seems not that relevant. They **do the same thing**. There are 2 different calls for the same reason that there are two different overarching API methodologies that exist. – Robert Crovella Apr 26 '21 at 15:41

0 Answers0