Bigwode / rebar-detection-competition

simple rebar detection competition https://www.datafountain.cn/competitions/332/details
39 stars 11 forks source link

cupy.cuda.nvrtc.NVRTCError: NVRTC_ERROR_COMPILATION (6) #3

Closed tianshuaifei closed 5 years ago

tianshuaifei commented 5 years ago

I can train it normally,but when i use python test.py ,I got the following error. i use: cuda8.0 cupy-cuda8.0 pytorch=0.4.1 make export: export CUDA_HOME=/usr/local/cuda-8.0 export PATH=${CUDA_HOME}/bin:${PATH} export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:$LD_LIBRARY_PATH

WARNING:root:Setting up a new session... WARNING:visdom:Without the incoming socket you cannot receive events from the server or register event handlers to your Visdom client. 519C12BD Traceback (most recent call last): File "/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/cuda/compiler.py", line 241, in compile nvrtc.compileProgram(self.ptr, options) File "cupy/cuda/nvrtc.pyx", line 98, in cupy.cuda.nvrtc.compileProgram File "cupy/cuda/nvrtc.pyx", line 108, in cupy.cuda.nvrtc.compileProgram File "cupy/cuda/nvrtc.pyx", line 53, in cupy.cuda.nvrtc.check_status cupy.cuda.nvrtc.NVRTCError: NVRTC_ERROR_COMPILATION (6)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "test.py", line 26, in _bboxes, _labels, _scores = trainer.faster_rcnn.predict(img, visualize=True) File "/home/yuqing/tsf/rebar-detection-competition/model/faster_rcnn.py", line 19, in new_f return f(*args,kwargs) File "/home/yuqing/tsf/rebar-detection-competition/model/faster_rcnn.py", line 227, in predict roi_cls_loc, roiscores, rois, = self(img, scale=scale) File "/home/yuqing/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, *kwargs) File "/home/yuqing/tsf/rebar-detection-competition/model/faster_rcnn.py", line 121, in forward self.rpn(h, img_size, scale) File "/home/yuqing/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(input, kwargs) File "/home/yuqing/tsf/rebar-detection-competition/model/region_proposal_network.py", line 119, in forward scale=scale) File "/home/yuqing/tsf/rebar-detection-competition/model/utils/creator_tool.py", line 411, in call thresh=self.nms_thresh) File "/home/yuqing/tsf/rebar-detection-competition/model/utils/nms/non_maximum_suppression.py", line 26, in non_maximum_suppression return _non_maximum_suppression_gpu(bbox, thresh, score, limit) File "/home/yuqing/tsf/rebar-detection-competition/model/utils/nms/non_maximum_suppression.py", line 38, in _non_maximum_suppression_gpu order = cp.arange(n_bbox, dtype=np.int32) File "/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/creation/ranges.py", line 57, in arange _arange_ufunc(typ(start), typ(step), ret, dtype=dtype) File "cupy/core/_kernel.pyx", line 821, in cupy.core._kernel.ufunc.call File "cupy/util.pyx", line 48, in cupy.util.memoize.decorator.ret File "cupy/core/_kernel.pyx", line 612, in cupy.core._kernel._get_ufunc_kernel File "cupy/core/_kernel.pyx", line 46, in cupy.core._kernel._get_simple_elementwise_kernel File "cupy/core/carray.pxi", line 148, in cupy.core.core.compile_with_cache File "/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/cuda/compiler.py", line 164, in compile_with_cache ptx = compile_using_nvrtc(source, options, arch) File "/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/cuda/compiler.py", line 82, in compile_using_nvrtc ptx = prog.compile(options) File "/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/cuda/compiler.py", line 245, in compile raise CompileException(log, self.src, self.name, options) cupy.cuda.compiler.CompileException: /home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(55): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(45): error: no suitable constructor exists to convert from "float" to "__half"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(47): error: no suitable constructor exists to convert from "float" to "__half"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(48): error: no suitable constructor exists to convert from "double" to "__half"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(49): error: no suitable constructor exists to convert from "int" to "__half"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(50): error: no suitable constructor exists to convert from "unsigned int" to "__half"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(51): error: no suitable constructor exists to convert from "long long" to "__half"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(52): error: no suitable constructor exists to convert from "unsigned long long" to "__half"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(57): error: no suitable conversion function from "const half" to "float" exists

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(62): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(66): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(66): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(71): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(75): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(79): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(107): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(107): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(108): error: expected a ";"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(109): error: expected a ";"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(110): error: identifier "retraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(110): error: identifier "yraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(115): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(115): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(116): error: expected a ";"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(117): error: expected a ";"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(119): error: identifier "retraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(121): error: identifier "retraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(123): error: identifier "retraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(123): error: identifier "yraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(125): error: identifier "yraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(126): error: identifier "retraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(128): error: identifier "retraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(130): error: identifier "yraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(131): error: identifier "retraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(133): error: identifier "retraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(135): error: identifier "retraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(140): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(140): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(141): error: expected a ";"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(142): error: identifier "yraw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/atomics.cuh(29): error: no suitable constructor exists to convert from "unsigned short" to "__half"

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/atomics.cuh(38): error: identifier "__half_raw" is undefined

/home/yuqing/anaconda3/lib/python3.6/site-packages/cupy/core/include/cupy/carray.cuh(281): warning: statement is unreachable detected during instantiation of "void CIndexer<_ndim>::set(ptrdiff_t) [with _ndim=1]" /tmp/tmp5dr6mwg9/kern.cu(12): here

42 errors detected in the compilation of "/tmp/tmp5dr6mwg9/kern.cu".

tianshuaifei commented 5 years ago

I changed the torch version pip uninstall torch pip install torch==0.4.0 it work well