Open apyskir opened 6 years ago
Hi, after running python build.py inside pytorch-mask-rcnn/nms I get a following error [1]. Do you have any ideas of how to build nms correctly?
python build.py
pytorch-mask-rcnn/nms
Cheers, Andrzej
[1]
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/mnt/ml-tea m/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include -I/mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/uti ls/ffi/../../lib/include/TH -I/mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/usr/include/python3.5m -I/mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/include/python3.5m -c _nms.c -o ./_nms.o x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/mnt/ml-tea m/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include -I/mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/uti ls/ffi/../../lib/include/TH -I/mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/usr/include/python3.5m -I/mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/include/python3.5m -c /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms.c -o ./mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms.o In file included from /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:4:0, from /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms.c:1: /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms.c: In function ‘cpu_nms’: /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms.c:7:42: warning: passing argument 1 of ‘THLongTensor_isContiguous’ from incompatible pointer type [-Wincompatible-pointer-types] THArgCheck(THLongTensor_isContiguous(boxes), 2, "boxes must be contiguous"); ^ /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THGeneral.h:80:35: note: in definition of macro ‘THArgCheck’ _THArgCheck(__FILE__, __LINE__, __VA_ARGS__); \ ^ /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THTensor.h:8:39: note: expected ‘const THLongTensor * {aka const struct THLongTens or *}’ but argument is of type ‘THFloatTensor * {aka struct THFloatTensor *}’ #define THTensor_(NAME) TH_CONCAT_4(TH,Real,Tensor_,NAME) ^ /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THGeneral.h:118:37: note: in definition of macro ‘TH_CONCAT_4_EXPAND’ #define TH_CONCAT_4_EXPAND(x,y,z,w) x ## y ## z ## w ^ /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THTensor.h:8:27: note: in expansion of macro ‘TH_CONCAT_4’ #define THTensor_(NAME) TH_CONCAT_4(TH,Real,Tensor_,NAME) ^ /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/generic/THTensor.h:115:12: note: in expansion of macro ‘THTensor_’ TH_API int THTensor_(isContiguous)(const THTensor *self); ^ /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms.c:9:42: warning: passing argument 1 of ‘THLongTensor_isContiguous’ from incompatible pointer type [-Wincompatible-pointer-types] THArgCheck(THLongTensor_isContiguous(areas), 4, "areas must be contiguous"); ^ /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THGeneral.h:80:35: note: in definition of macro ‘THArgCheck’ _THArgCheck(__FILE__, __LINE__, __VA_ARGS__); \ ^ /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THTensor.h:8:39: note: expected ‘const THLongTensor * {aka const struct THLongTensor *}’ but argument is of type ‘THFloatTensor * {aka struct THFloatTensor *}’ #define THTensor_(NAME) TH_CONCAT_4(TH,Real,Tensor_,NAME) ^ /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THGeneral.h:118:37: note: in definition of macro ‘TH_CONCAT_4_EXPAND’ #define TH_CONCAT_4_EXPAND(x,y,z,w) x ## y ## z ## w ^ /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THTensor.h:8:27: note: in expansion of macro ‘TH_CONCAT_4’ #define THTensor_(NAME) TH_CONCAT_4(TH,Real,Tensor_,NAME) ^ /mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/generic/THTensor.h:115:12: note: in expansion of macro ‘THTensor_’ TH_API int THTensor_(isContiguous)(const THTensor *self); ^ x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include -I/mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH -I/mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/usr/include/python3.5m -I/mnt/ml-team/homes/andrzej.pyskir/mapping_challenge/venv/include/python3.5m -c /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms_cuda.c -o ./mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms_cuda.o /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms_cuda.c: In function ‘gpu_nms’: /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms_cuda.c:29:35: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] unsigned long long* mask_flat = THCudaLongTensor_data(state, mask); ^ /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms_cuda.c:37:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] unsigned long long * mask_cpu_flat = THLongTensor_data(mask_cpu); ^ /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms_cuda.c:40:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] unsigned long long* remv_cpu_flat = THLongTensor_data(remv_cpu); ^ /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms_cuda.c:23:7: warning: unused variable ‘boxes_dim’ [-Wunused-variable] int boxes_dim = THCudaTensor_size(state, boxes, 1); ^ x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 ./_nms.o ./mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms.o ./mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/nms_cuda.o /mnt/ml-team/warta/andrzej/pytorch-mask-rcnn/nms/src/cuda/nms_kernel.cu.o -o ./_nms.so
Actually there are only warnings, so it should work.
实际上,只有警告,因此它应该起作用。
hi,I'm in the same situation as you,but from ._nms import lib as _lib, ffi as _ffi in /nms/init.py is error,please help me ,thanks
Hi, after running
python build.py
insidepytorch-mask-rcnn/nms
I get a following error [1]. Do you have any ideas of how to build nms correctly?Cheers, Andrzej
[1]