Coder Social home page Coder Social logo

bp-net's People

Contributors

kakaxi314 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bp-net's Issues

训练设置问题咨询

请问您在kitti榜单上的效果是否有在nyu数据集上预训练呢?还是只在kitti数据集上训练得到的结果?
谢谢~

Inference given a sparse KITTI depth map

Dear Authors,

Thanks for the amazing work!!

Can you please guide me on how I can achieve depth completion for a KITTI image which looks like the below one.
000380_up

Best!

Inference at higher resolution on NYU

Hello,
thanks a lot for providing the code for your method!
I was trying it out on NYU but doing inference at the original resolution of 640x480 always using 500 random valid points. As you see in the plot, I get some bizarre texture in the results. While I acknowledge that the point density is now more than four times lower and that you also ablate a significant performance loss in the paper when using fewer points, I cannot explain why these square textures should appear in the first place, especially in flat regions of the background. Do you have any intuition about which part of the network might be failing there?

comparison

Just to double-check, I modified the NYU dataloader so that it does not apply the resizing and cropping to RGB and GT, the camera matrix is not transformed, and no padding is used as the resolution is divisible by 32. Is this the correct procedure to test generalization to other resolutions? And for a different dataset, should I just swap the camera matrix?
Best,
Massimiliano

训练过程问题

Dear Authors,
Thanks for the amazing work!
when I run:
torchrun --nproc_per_node=4 --master_port 4321 train.py gpus=[0] num_workers=4 name=BP_KITTI net=PMP data=KITTI lr=1e-3 train_batch_size=2 test_batch_size=2 sched/lr=NoiseOneCycleCosMo sched.lr.policy.max_momentum=0.90 nepoch=30 test_epoch=25 ++net.sbn=true
There are outputs:

WARNING:torch.distributed.run:
*****************************************
Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed. 
*****************************************
Error executing job with overrides: ['gpus=[0]', 'num_workers=4', 'name=BP_KITTI', 'net=PMP', 'data=KITTI', 'lr=1e-3', 'train_batch_size=2', 'test_batch_size=2', 'sched/lr=NoiseOneCycleCosMo', 'sched.lr.policy.max_momentum=0.90', 'nepoch=30', 'test_epoch=25', '++net.sbn=true']
Error executing job with overrides: ['gpus=[0]', 'num_workers=4', 'name=BP_KITTI', 'net=PMP', 'data=KITTI', 'lr=1e-3', 'train_batch_size=2', 'test_batch_size=2', 'sched/lr=NoiseOneCycleCosMo', 'sched.lr.policy.max_momentum=0.90', 'nepoch=30', 'test_epoch=25', '++net.sbn=true']
Error executing job with overrides: ['gpus=[0]', 'num_workers=4', 'name=BP_KITTI', 'net=PMP', 'data=KITTI', 'lr=1e-3', 'train_batch_size=2', 'test_batch_size=2', 'sched/lr=NoiseOneCycleCosMo', 'sched.lr.policy.max_momentum=0.90', 'nepoch=30', 'test_epoch=25', '++net.sbn=true']
[2024-06-03 15:41:57,958][BP_KITTI][INFO] - device is 0
[2024-06-03 15:41:57,958][BP_KITTI][INFO] - Random Seed: 0001
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
  File "train.py", line 72, in main
    with Trainer(cfg) as run:
  File "train.py", line 72, in main
    with Trainer(cfg) as run:
  File "train.py", line 72, in main
    with Trainer(cfg) as run:
  File "/home/wsy/python_ws/BP-Net/utils.py", line 52, in __init__
    self.cfg.gpu_id = self.cfg.gpus[self.rank]
  File "/home/wsy/python_ws/BP-Net/utils.py", line 52, in __init__
    self.cfg.gpu_id = self.cfg.gpus[self.rank]
  File "/home/wsy/python_ws/BP-Net/utils.py", line 52, in __init__
    self.cfg.gpu_id = self.cfg.gpus[self.rank]
omegaconf.errors.ConfigIndexError: list index out of range
    full_key: gpus[2]
    object_type=list
omegaconf.errors.ConfigIndexError: list index out of range
    full_key: gpus[3]
    object_type=list
omegaconf.errors.ConfigIndexError: list index out of range
    full_key: gpus[1]
    object_type=list

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
2024-06-03 15:41:58.034063: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
[2024-06-03 15:41:58,921][BP_KITTI][INFO] - num_train = 42949, num_test = 500
WARNING:torch.distributed.elastic.multiprocessing.api:Sending process 188296 closing signal SIGTERM
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 1 (pid: 188297) of binary: /home/wsy/anaconda3/envs/bevnet/bin/python
Traceback (most recent call last):
  File "/home/wsy/anaconda3/envs/bevnet/bin/torchrun", line 8, in <module>
    sys.exit(main())
  File "/home/wsy/anaconda3/envs/bevnet/lib/python3.8/site-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 345, in wrapper
    return f(*args, **kwargs)
  File "/home/wsy/anaconda3/envs/bevnet/lib/python3.8/site-packages/torch/distributed/run.py", line 719, in main
    run(args)
  File "/home/wsy/anaconda3/envs/bevnet/lib/python3.8/site-packages/torch/distributed/run.py", line 710, in run
    elastic_launch(
  File "/home/wsy/anaconda3/envs/bevnet/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 131, in __call__
    return launch_agent(self._config, self._entrypoint, list(args))
  File "/home/wsy/anaconda3/envs/bevnet/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 259, in launch_agent
    raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError: 
============================================================
train.py FAILED
------------------------------------------------------------
Failures:
[1]:
  time      : 2024-06-03_15:42:02
  host      : wsy-OMEN-by-HP-Gaming-Laptop-16-wf0xxx
  rank      : 2 (local_rank: 2)
  exitcode  : 1 (pid: 188298)
  error_file: <N/A>
  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
[2]:
  time      : 2024-06-03_15:42:02
  host      : wsy-OMEN-by-HP-Gaming-Laptop-16-wf0xxx
  rank      : 3 (local_rank: 3)
  exitcode  : 1 (pid: 188299)
  error_file: <N/A>
  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
------------------------------------------------------------
Root Cause (first observed failure):
[0]:
  time      : 2024-06-03_15:42:02
  host      : wsy-OMEN-by-HP-Gaming-Laptop-16-wf0xxx
  rank      : 1 (local_rank: 1)
  exitcode  : 1 (pid: 188297)
  error_file: <N/A>
  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
============================================================

May I ask how I should solve it, Thanks!

import BpOps

在您的code中有看到這行"import BpOps",請問要如何做到呢? 我在網路上沒有找到相關的訊息,不方便提供的話也沒關係,謝謝,非常謝謝您提供這篇paper

General Question about Generalization

Hi,
Thanks for providing this awesome work open source!

I would like to ask for your advice on something. I have input RGB and sparse depth which typically looks like this (from ScanNet). Here, the depth is not from the depth sensor, but computed with another technique. I wonder, do you think that your model, presumably the one trained on the indoor NYU dataset, could complete these depth maps?

I will nevertheless test it, but would be very grateful for any advice you may have on this! I suspect that one issue may be that the sparse depth maps you trained on were more uniformly sampled, while mine is not necessarily uniform. I do have access to depth from the other pixels, but it is not reliable so I would like to replace it with depth from your method if possible.

image

Best,
Erik

command '/usr/local/cuda-12.1/bin/nvcc' failed with exit code 1

I'm encountering some issues with python setup.py install. I'm using GCC 12.3 and CUDA 12.1

(bp) root@s:/home/BP-Net-main/exts# python setup.py install
running install
/root/miniconda3/envs/bp/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

    ********************************************************************************
    Please avoid running ``setup.py`` directly.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!!
self.initialize_options()
/root/miniconda3/envs/bp/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

    ********************************************************************************
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!!
self.initialize_options()
running bdist_egg
running egg_info
writing BpOps.egg-info/PKG-INFO
writing dependency_links to BpOps.egg-info/dependency_links.txt
writing top-level names to BpOps.egg-info/top_level.txt
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/utils/cpp_extension.py:500: UserWarning: Attempted to use ninja as the BuildExtension 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 'BpOps.egg-info/SOURCES.txt'
writing manifest file 'BpOps.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/utils/cpp_extension.py:425: UserWarning: There are no /root/miniconda3/envs/bp/bin/x86_64-conda-linux-gnu-c++ version bounds defined for CUDA version 12.1
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'BpOps' extension
creating build
creating build/temp.linux-x86_64-cpython-39
/root/miniconda3/envs/bp/bin/x86_64-conda-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /root/miniconda3/envs/bp/include -fPIC -O2 -isystem /root/miniconda3/envs/bp/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /root/miniconda3/envs/bp/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /root/miniconda3/envs/bp/include -fPIC -I/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include -I/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/TH -I/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-12.1/include -I/root/miniconda3/envs/bp/include/python3.9 -c bp_cuda.cpp -o build/temp.linux-x86_64-cpython-39/bp_cuda.o -g -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -DTORCH_EXTENSION_NAME=BpOps -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
/usr/local/cuda-12.1/bin/nvcc -I/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include -I/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/TH -I/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-12.1/include -I/root/miniconda3/envs/bp/include/python3.9 -c bp_cuda_kernel.cu -o build/temp.linux-x86_64-cpython-39/bp_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
_ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=BpOps -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -ccbin /root/miniconda3/envs/bp/bin/x86_64-conda-linux-gnu-cc -std=c++17
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/pybind11/detail/../cast.h: In function 'typename pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type::type>::cast_op_type pybind11::detail::cast_op(make_caster&)':
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/pybind11/detail/../cast.h:45:120: error: expected template-name before '<' token
45 | return caster.operator typename make_caster::template cast_op_type();
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/pybind11/detail/../cast.h:45:120: error: expected identifier before '<' token
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/pybind11/detail/../cast.h:45:123: error: expected primary-expression before '>' token
45 | return caster.operator typename make_caster::template cast_op_type();
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/pybind11/detail/../cast.h:45:126: error: expected primary-expression before ')' token
45 | return caster.operator typename make_caster::template cast_op_type();
| ^
bp_cuda_kernel.cu: In lambda function:
bp_cuda_kernel.cu:138:39: warning: 'at::DeprecatedTypeProperties& at::Tensor::type() const' is deprecated: Tensor.type() is deprecated. Instead 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]
138 | AT_DISPATCH_FLOATING_TYPES(Pc.type(), "DistF1_Cuda", ([&] {
| ~~~~~~~~~^~
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:225:1: note: declared here
225 | DeprecatedTypeProperties & type() const {
| ^ ~~
bp_cuda_kernel.cu:138:144: warning: 'c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)' is deprecated: passing at::DeprecatedTypeProperties to an AT_DISPATCH macro is deprecated, pass an at::ScalarType instead [-Wdeprecated-declarations]
138 | AT_DISPATCH_FLOATING_TYPES(Pc.type(), "DistF1_Cuda", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:109:1: note: declared here
109 | inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties& t) {
| ^~~~~~~~~~~
bp_cuda_kernel.cu: In lambda function:
bp_cuda_kernel.cu:154:38: warning: 'at::DeprecatedTypeProperties& at::Tensor::type() const' is deprecated: Tensor.type() is deprecated. Instead 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]
154 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LF", ([&] {
| ~~~~~~~~^~
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:225:1: note: declared here
225 | DeprecatedTypeProperties & type() const {
| ^ ~~
bp_cuda_kernel.cu:154:141: warning: 'c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)' is deprecated: passing at::DeprecatedTypeProperties to an AT_DISPATCH macro is deprecated, pass an at::ScalarType instead [-Wdeprecated-declarations]
154 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LF", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:109:1: note: declared here
109 | inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties& t) {
| ^~~~~~~~~~~
bp_cuda_kernel.cu: In lambda function:
bp_cuda_kernel.cu:154:1001: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
154 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LF", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:154:1023: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
154 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LF", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:154:1045: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
154 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LF", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu: In lambda function:
bp_cuda_kernel.cu:154:1906: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
154 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LF", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:154:1927: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
154 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LF", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:154:1948: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
154 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LF", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu: In lambda function:
bp_cuda_kernel.cu:169:38: warning: 'at::DeprecatedTypeProperties& at::Tensor::type() const' is deprecated: Tensor.type() is deprecated. Instead 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]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ~~~~~~~~^~
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:225:1: note: declared here
225 | DeprecatedTypeProperties & type() const {
| ^ ~~
bp_cuda_kernel.cu:169:141: warning: 'c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)' is deprecated: passing at::DeprecatedTypeProperties to an AT_DISPATCH macro is deprecated, pass an at::ScalarType instead [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:109:1: note: declared here
109 | inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties& t) {
| ^~~~~~~~~~~
bp_cuda_kernel.cu: In lambda function:
bp_cuda_kernel.cu:169:1001: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:169:1023: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:169:1046: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:169:1069: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:169:1092: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu: In lambda function:
bp_cuda_kernel.cu:169:1953: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:169:1974: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:169:1996: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:169:2018: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
bp_cuda_kernel.cu:169:2040: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
169 | AT_DISPATCH_FLOATING_TYPES(x.type(), "Conv2d_LB", ([&] {
| ^
/root/miniconda3/envs/bp/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
247 | T * data() const {
| ^ ~~
error: command '/usr/local/cuda-12.1/bin/nvcc' failed with exit code 1``

Some error in setup BpOps,“BP-Net-main/exts/build/temp.linux-x86_64-cpython-39/bp_cuda_kernel.o: No such file or directory”

I installed cuda12.1 on the server in my lab, and the gcc version is 12.3. After creating an environment named bp according to the README, I first encountered the ninja problem "Command '['ninja', '-v']' returned non-zero exit status 1". After changing command = ['ninja', '-v'] to command = ['ninja', '--version'] according to this issue.
I encountered the following error(zzy is my acount name):

(bp) zzy@ICML:~/code/BP-Net-main/exts$ python setup.py install
running install
running bdist_egg
running egg_info
writing BpOps.egg-info/PKG-INFO
writing dependency_links to BpOps.egg-info/dependency_links.txt
writing top-level names to BpOps.egg-info/top_level.txt
reading manifest file 'BpOps.egg-info/SOURCES.txt'
writing manifest file 'BpOps.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
/home/zzy/anaconda3/envs/bp/lib/python3.9/site-packages/torch/utils/cpp_extension.py:426: UserWarning: There are no /home/zzy/anaconda3/envs/bp/bin/x86_64-conda-linux-gnu-c++ version bounds defined for CUDA version 12.1
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'BpOps' extension
Emitting ninja build file /home/zzy/code/BP-Net-main/exts/build/temp.linux-x86_64-cpython-39/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.10.1
creating build/lib.linux-x86_64-cpython-39
/home/zzy/anaconda3/envs/bp/bin/x86_64-conda-linux-gnu-c++ -shared -Wl,--allow-shlib-undefined -Wl,-rpath,/home/zzy/anaconda3/envs/bp/lib -Wl,-rpath-link,/home/zzy/anaconda3/envs/bp/lib -L/home/zzy/anaconda3/envs/bp/lib -Wl,--allow-shlib-undefined -Wl,-rpath,/home/zzy/anaconda3/envs/bp/lib -Wl,-rpath-link,/home/zzy/anaconda3/envs/bp/lib -L/home/zzy/anaconda3/envs/bp/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/home/zzy/anaconda3/envs/bp/lib -Wl,-rpath-link,/home/zzy/anaconda3/envs/bp/lib -L/home/zzy/anaconda3/envs/bp/lib -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/zzy/anaconda3/envs/bp/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/zzy/anaconda3/envs/bp/include /home/zzy/code/BP-Net-main/exts/build/temp.linux-x86_64-cpython-39/bp_cuda.o /home/zzy/code/BP-Net-main/exts/build/temp.linux-x86_64-cpython-39/bp_cuda_kernel.o -L/home/zzy/anaconda3/envs/bp/lib/python3.9/site-packages/torch/lib -L/usr/local/cuda-12.1/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-cpython-39/BpOps.cpython-39-x86_64-linux-gnu.so
/home/zzy/anaconda3/envs/bp/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find /home/zzy/code/BP-Net-main/exts/build/temp.linux-x86_64-cpython-39/bp_cuda_kernel.o: No such file or directory
collect2: error: ld returned 1 exit status
error: command '/home/zzy/anaconda3/envs/bp/bin/x86_64-conda-linux-gnu-c++' failed with exit code 1

This seems to be because the bp_cuda_kernel.o file is not generated during compilation. Is it because of my cuda version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.