Error: identifier "THCudaBlas_Sgemv" is undefined

I am trying to compile DCNv2 layer from this repo While doing so my compilation fails with this error in stack trace “src/cuda/ error: identifier “THCudaBlas_Sgemv” is undefined”. Any help??

It seems, the method was already updated as seen here.

Seems that THCudaBlas_Sgemv has been moved to at::cuda::blas::gemv. But after compiling the dcn with the new API linkage error shows up like undefined symbol: _ZN2at4cuda4blas4gemvIfEEvcllT_PKS3_lS5_lS3_PS3_l . After going through torch repo i couldnt find the definition of at::cuda::blas::gemv anywhere. Am I missing something??

The method definition starts in this line of code and defines different dtypes etc.

Some examples on its usage are e.g. in

Try this

Using nvidia tensorrt 20.11 image and pytorch 1.7.1,
Running this

find . -type f -exec sed -i 's/THCState_getCurrentStream(state)/c10::cuda::getCurrentCUDAStream()/g' {} \;

And replace external/DCNv2/src/cuda/ file by this version DCNv2/ at c916fdf2ed69ebebc43cbe8a2cb5e7ce0dd71132 · lbin/DCNv2 · GitHub

I manage to get a successful build, but I have the same issue mentionned above when importing dcn_v2 :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "yolact/external/DCNv2/", line 13, in <module>
    import _ext as _backend
ImportError: yolact/external/DCNv2/ undefined symbol: _ZN2at4cuda4blas4gemvIfEEvcllT_PKS3_lS5_lS3_PS3_l