Daikenan/LT_DSE

torch.utils.ffi is deprecated. Please use cpp extensions instead.

xQsM3 opened this issue · 0 comments

xQsM3 commented

My machine:
Ubuntu 20.04
RTX 3090
CUDA 11 (lower is not supported by the GPU)
pytorch 1.7.0 (lower not supported by the GPU)

running vot test LT_DSE I am facing following error:

Checking for new version
Scanning registry /home/linx123-rtx/vot-workspace/trackers.ini
Found 14 trackers
Generating dummy sequence
Obtaining runtime for tracker LT_DSE
Initializing tracker (1/3)
Running process: /home/linx123-rtx/anaconda3/envs/LT_DSE/bin/python -c "import sys;sys.path.insert(0, '/home/linx123-rtx/vot-workspace/LT_DSE'); import tracker_vot"
/home/linx123-rtx/anaconda3/envs/LT_DSE/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/linx123-rtx/anaconda3/envs/LT_DSE/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/linx123-rtx/anaconda3/envs/LT_DSE/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/linx123-rtx/anaconda3/envs/LT_DSE/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/linx123-rtx/anaconda3/envs/LT_DSE/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/linx123-rtx/anaconda3/envs/LT_DSE/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
File "", line 1, in
File "/home/linx123-rtx/vot-workspace/LT_DSE/tracker_vot.py", line 40, in
from data_prov import *
File "/home/linx123-rtx/vot-workspace/LT_DSE/RT_MDNet/modules/data_prov.py", line 16, in
from img_cropper import *
File "/home/linx123-rtx/vot-workspace/LT_DSE/RT_MDNet/img_cropper.py", line 5, in
from roi_align.modules.roi_align import RoIAlign
File "/home/linx123-rtx/vot-workspace/LT_DSE/RT_MDNet/modules/roi_align/modules/roi_align.py", line 3, in
from ..functions.roi_align import RoIAlignFunction, RoIAlignAdaFunction, RoIAlignDenseAdaFunction
File "/home/linx123-rtx/vot-workspace/LT_DSE/RT_MDNet/modules/roi_align/functions/roi_align.py", line 3, in
from .._ext import roi_align
File "/home/linx123-rtx/vot-workspace/LT_DSE/RT_MDNet/modules/roi_align/_ext/roi_align/init.py", line 2, in
from torch.utils.ffi import _wrap_function
File "/home/linx123-rtx/anaconda3/envs/LT_DSE/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 1, in
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Error during tracker execution: Unable to connect to tracker

I found this solution attempt to replace ffi by cpp extension:

https://blog.csdn.net/ShuqiaoS/article/details/88420326

but it does not really help. It looks like I need to replace the _wrap_function in the roi_align/init.py script by some wrap functions working for the cpp extensions, but i have no idea how! Could you please help me? As I mentioned above, downgrading of pytorch / cuda is not possible cause it does not support my GPU

Kind Regards