openppl-public / ppl.cv

ppl.cv is a high-performance image processing library of openPPL supporting various platforms.
Apache License 2.0
484 stars 108 forks source link

CUDA 12 changes, replace texture references with texture objects #137

Closed pieris98 closed 4 days ago

pieris98 commented 1 month ago

Replaced deprecated texture references (which don't work in CUDA 12) with textureObjects. ppl.cv cuda-build builds successfully on my machine (RTX3090, sm86 compute capability, CUDA toolkit version 12.2), but I haven't run any tests to check for correctness of the updated kernels. Please review and merge at your will.

jimurk commented 4 days ago

Thanks for your work. Since we want to maintain support to some old gpus, we hope to add new features while carefully removing old code. So, you can have code of both texture objects and texture references using the following macro definition and don't comment code in cuda.cmake.

if CUDACC_VER_MAJOR == 12

// code using texture Objects

else

// code using texture references

endif

pieris98 commented 4 days ago

Are you going to review the code changes and wrap them with these statements (I suppose you mean #ifdef??) or are you waiting for a new PR?