Skip to content
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

There was a problem installing ProSTGrid #23

Open
breeze623 opened this issue Nov 16, 2022 · 6 comments
Open

There was a problem installing ProSTGrid #23

breeze623 opened this issue Nov 16, 2022 · 6 comments

Comments

@breeze623
Copy link

I met a problem while running python setup.py install, what should I do.

running install
/home/ubuntu/.local/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is depre cated. Use build and pip and other standards-based tools.
warnings.warn(
/home/ubuntu/.local/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install comma nd is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/home/ubuntu/.local/lib/python3.8/site-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 0.18ubuntu0.18.04.1 is an invalid version and will not be supported in a future release
warnings.warn(
running bdist_egg
running egg_info
creating ProSTGrid.egg-info
writing ProSTGrid.egg-info/PKG-INFO
writing dependency_links to ProSTGrid.egg-info/dependency_links.txt
writing top-level names to ProSTGrid.egg-info/top_level.txt
writing manifest file 'ProSTGrid.egg-info/SOURCES.txt'
/home/ubuntu/.local/lib/python3.8/site-packages/torch/utils/cpp_extension.py:369: UserWarning: Attempted to use ninja as the BuildExtensi on backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'ProSTGrid.egg-info/SOURCES.txt'
writing manifest file 'ProSTGrid.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'ProSTGrid' extension
creating build
creating build/temp.linux-x86_64-cpython-38
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werro r=format-security -g -fwrapv -O2 -fPIC -I/home/ubuntu/.local/lib/python3.8/site-packages/torch/include -I/home/ubuntu/.local/lib/python3. 8/site-packages/torch/include/torch/csrc/api/include -I/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/TH -I/home/ubuntu/.l ocal/lib/python3.8/site-packages/torch/include/THC -I/usr/include/python3.8 -c ProSTGrid.cpp -o build/temp.linux-x86_64-cpython-38/ProSTG rid.o -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi10 11" -DTORCH_EXTENSION_NAME=ProSTGrid -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
In file included from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/ATen/Parallel.h:140:0,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/all.h:13,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/torch/extension.h:4,
from ProSTGrid.cpp:7:
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/ATen/ParallelOpenMP.h:83:0: warning: ignoring #pragma omp parallel [-Wunkno wn-pragmas]
#pragma omp parallel for if ((end - begin) >= grain_size)

ProSTGrid.cpp: In function ‘at::Tensor ProST_grid_generator_forward(const at::Tensor&, c10::IntArrayRef, float, float, float, float, floa t, float, bool)’:
ProSTGrid.cpp:94:17: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instea d use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type ().backend() use tensor.device(). [-Wdeprecated-declarations]
if(theta.type().is_cuda()){
^
In file included from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/ATen/Tensor.h:3:0,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/ATen/Context.h:4,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/ATen/ATen.h:9,
from ProSTGrid.cpp:5:
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h:303:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
/usr/bin/nvcc -I/home/ubuntu/.local/lib/python3.8/site-packages/torch/include -I/home/ubuntu/.local/lib/python3.8/site-packages/torch/inc lude/torch/csrc/api/include -I/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/TH -I/home/ubuntu/.local/lib/python3.8/site-p ackages/torch/include/THC -I/usr/include/python3.8 -c ProSTGrid_kernel.cu -o build/temp.linux-x86_64-cpython-38/ProSTGrid_kernel.o -D__CU DA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-con stexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPY BIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=ProSTGrid -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=sm_80 -gencode =arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
nvcc fatal : Unsupported gpu architecture 'compute_80'
error: command '/usr/bin/nvcc' failed with exit code 1

@breeze623
Copy link
Author

BTW my GPU is RTX3090.

@gaocong13
Copy link
Owner

This looks like a CUDA - GPU version compatibility issue. You may want to try installing CUDA 11.0 according to this post: NVIDIA/cuda-samples#44

@puallee
Copy link

puallee commented Nov 17, 2022

Can this code support Cuda 11.2 or 11.4?

@gaocong13
Copy link
Owner

This code uses the pytorch cuda and c++ extension. As long as the Pytorch and CUDA versions are compatible, it should work.

@breeze623
Copy link
Author

There was a new problem while running python3.8 ProST_example_regi.py. :(

Traceback (most recent call last):
  File "ProST_example_regi.py", line 77, in <module>
    main()
  File "ProST_example_regi.py", line 39, in main
    target = projmodel(_3D_vol, ray_proj_mov, rtvec_gt, corner_pt)
  File "/home/broncus/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/broncus/Projective-Spatial-Transformers-master/src/module.py", line 171, in forward
    x_3d_ad = _bilinear_interpolate_no_torch_5D(x, grid_trans)
  File "/home/broncus/Projective-Spatial-Transformers-master/src/util.py", line 185, in _bilinear_interpolate_no_torch_5D
    x =  width * (grid[:, :, :, :, 0] * 0.5 + 0.5)
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

I think it caused by
grid = ProSTGrid.forward(corner_pt, y.size(), dist_min.data, dist_max.data, self.src, self.det, self.pix_spacing, self.step_size, False)
in module.py line 166. Since I cant print grid(It would show the same problem when I try to print).

@gaocong13
Copy link
Owner

Hi, sorry for delayed response. The error message suggests that your CUDA device (GPU) is not available. You can check: torch.cuda.is_available()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants