-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
roi_crop (from Detectron.pytorch) building consistently fails #8483
Comments
I believe this issue should be opened in the |
FYI, this is because we made some structs in THC abstract in HEAD. Any sites which accessed members directly have to use a function instead now. |
Is there a reference what changes have to happen to correspond to changes in PyTorch? Detectron repo is not the only one affected, there are at least 2 others. |
Not yet, but you can get some guidance looking at 4caea64; look at changes to files in torch/csrc |
I've been looking at the changes and unfortunately I am not seeing how everything is connected. The first error occurs in this line: #include <THC/THC.h> #define real float // this symbol will be resolved automatically from PyTorch libs // Bilinear sampling is done in BHWD (coalescing is not obvious in BDHW) int BilinearSamplerBHWD_updateOutput_cuda(THCudaTensor *inputImages, THCudaTensor *grids, THCudaTensor *output){ int success = 0; //check for errors |
I made the following mods to one file and similar mods to two others. I'd appreciate a comment if it makes sense. #include <THC/THC.h> // this symbol will be resolved automatically from PyTorch libs int nms_cuda(THCudaIntTensor *keep_out, THCudaTensor *boxes_host,
} |
@phalexo You could try out to install |
I want to follow up on this issue. The commit mentioned earlier 4caea64 makes a lot of user defined cpp/cuda extensions broken on I think a tutorial or at least detailed comment can be provided illustrating how to migrate these extensions into the newer Thanks for your time. Edit: |
@JiamingSuen The world is small LOL Struggling to get flownet2-pytorch built |
Face the same issue. Currently, I am using CUDA 9.2. I can't degrade pytorch 0.4.1 to lower versions because cuda 9.2 doesn't support them. And I don't want to degrade CUDA. |
@ezyang Any more comments would be nice to address this issue. |
@JiamingSuen your references are all spot-on. Also look at how we migrated We're happy to answer any questions. |
Python has no problem with importing pytorch, but building the extension fails.
gcc -pthread -B /home/developer/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/developer/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/developer/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/developer/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/developer/anaconda3/envs/pytorch/include/python3.6m -c /home/developer/Detectron.pytorch/lib/model/roi_crop/src/roi_crop_cuda.c -o ./home/developer/Detectron.pytorch/lib/model/roi_crop/src/roi_crop_cuda.o -std=c99
/home/developer/Detectron.pytorch/lib/model/roi_crop/src/roi_crop_cuda.c: In function 'BilinearSamplerBHWD_updateOutput_cuda':
/home/developer/Detectron.pytorch/lib/model/roi_crop/src/roi_crop_cuda.c:22:64: error: dereferencing pointer to incomplete type 'THCTensor {aka struct THCTensor}'
success = BilinearSamplerBHWD_updateOutput_cuda_kernel(output->size[1],
^
Traceback (most recent call last):
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build
dist.run_command('build_ext')
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/home/developer/anaconda3/envs/pytorch/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
The text was updated successfully, but these errors were encountered: