深度学习|可变形卷积DCNv3编译安装

可变形卷积DCNv3编译安装

相关环境

pytorch

cpp 复制代码
torch                    2.6.0+cu124
torchaudio               2.6.0+cu124
torchvision              0.21.0+cu124

nvcc -V

cpp 复制代码
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0

nvidia-smi

cpp 复制代码
Mon Dec 29 21:11:20 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.76.05              Driver Version: 580.76.05      CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 4090        On  |   00000000:38:00.0 Off |                  Off |
| 60%   62C    P2            292W /  450W |   23525MiB /  24564MiB |     62%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   1  NVIDIA GeForce RTX 4090        On  |   00000000:B8:00.0 Off |                  Off |
| 42%   50C    P2            190W /  450W |   14697MiB /  24564MiB |     68%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   2  NVIDIA GeForce RTX 4090        On  |   00000000:D8:00.0 Off |                  Off |
| 48%   54C    P2            198W /  450W |    5449MiB /  24564MiB |     55%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    No running processes found                                                           |
+-----------------------------------------------------------------------------------------+

gcc -V

cpp 复制代码
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04.2' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-2Y5pKs/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-2Y5pKs/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.2) 

g++ -v

cpp 复制代码
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04.2' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-2Y5pKs/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-2Y5pKs/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.2) 

python

cpp 复制代码
Python 3.11.14 (main, Oct 21 2025, 18:31:21) [GCC 11.2.0] on linux

下载好可变形卷积DCNv3的源码

点击传送门即可下载

编译安装

第一步

进入ops_dcnv3命令。检查当前目录是否为ops_dcnv3根目录也就是setup.py文件的目录

cpp 复制代码
(mambavision) root@b6cd5030aebc:~/local-disk/workspace/DAMamba/classification/models/ops_dcnv3# pwd
/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3

进入 ops_dcnv3目录执行安装命令

使用 pip 安装使用pip 命令

cpp 复制代码
pip install --no-build-isolation . --verbose

使用 python 安装使用python命令

cpp 复制代码
python setup.py build install

这两个编译安装命令哪个都行,笔者使用的是pip命令也就是

cpp 复制代码
pip install --no-build-isolation . --verbose

这个命令是使用 pip 安装本地 Python 包的一个具体方式,要看清楚了--no-build-isolation后面还有一个点(.)表示当前目录的意思,现在让我们来解析各个部分的含义:

  • pip install - 这是 Python 包管理工具 pip 的基本安装命令

  • --no-build-isolation - 这个选项禁用了构建隔离功能: 默认情况下,pip 会创建一个临时的隔离环境来构建包 禁用后,会使用当前环境中的依赖来构建包 通常用于调试或当你需要确保使用特定版本的构建依赖时

  • . - 表示安装当前目录下的包,通常这个目录包含 setup.py 或 pyproject.toml 文件

  • --verbose - 启用详细输出模式:

    会显示更多安装过程中的细节,如下载地址、编译步骤等 有助于调试安装过程中出现的问题

第二部

执行编译指令

cpp 复制代码
pip install --no-build-isolation . --verbose

报错输出

cpp 复制代码
(mambavision) root@b6cd5030aebc:~/local-disk/workspace/DAMamba/classification/models/ops_dcnv3# pip install --no-build-isolation . --verbose
Using pip 25.3 from /opt/conda/envs/mambavision/lib/python3.11/site-packages/pip (python 3.11)
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Processing /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3
  Running command Preparing metadata (pyproject.toml)
  running dist_info
  creating /tmp/pip-modern-metadata-pl9t1dur/DCNv3.egg-info
  writing /tmp/pip-modern-metadata-pl9t1dur/DCNv3.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-modern-metadata-pl9t1dur/DCNv3.egg-info/dependency_links.txt
  writing top-level names to /tmp/pip-modern-metadata-pl9t1dur/DCNv3.egg-info/top_level.txt
  writing manifest file '/tmp/pip-modern-metadata-pl9t1dur/DCNv3.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-modern-metadata-pl9t1dur/DCNv3.egg-info/SOURCES.txt'
  writing manifest file '/tmp/pip-modern-metadata-pl9t1dur/DCNv3.egg-info/SOURCES.txt'
  creating '/tmp/pip-modern-metadata-pl9t1dur/dcnv3-1.1.dist-info'
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: DCNv3
  Running command Building wheel for DCNv3 (pyproject.toml)
  running bdist_wheel
  running build
  running build_py
  creating build/lib.linux-x86_64-cpython-311/functions
  copying functions/__init__.py -> build/lib.linux-x86_64-cpython-311/functions
  copying functions/dcnv3_func.py -> build/lib.linux-x86_64-cpython-311/functions
  running build_ext
  building 'DCNv3' extension
  creating /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cpu
  creating /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/utils/cpp_extension.py:2061: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
  If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
    warnings.warn(
  Emitting ninja build file /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/build.ninja...
  Compiling objects...
  Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
  [1/3] c++ -MMD -MF /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cpu/dcnv3_cpu.o.d -pthread -B /opt/conda/envs/mambavision/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/envs/mambavision/include -fPIC -O2 -isystem /opt/conda/envs/mambavision/include -fPIC -DWITH_CUDA -I/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/TH -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/THC -I/opt/conda/envs/mambavision/include -I/opt/conda/envs/mambavision/include/python3.11 -c -c /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cpu/dcnv3_cpu.cpp -o /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cpu/dcnv3_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=DCNv3 -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
  [2/3] /opt/conda/envs/mambavision/bin/nvcc --generate-dependencies-with-compile --dependency-output /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.o.d -DWITH_CUDA -I/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/TH -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/THC -I/opt/conda/envs/mambavision/include -I/opt/conda/envs/mambavision/include/python3.11 -c -c /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu -o /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.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'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=DCNv3 -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17
  FAILED: [code=2] /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.o
  /opt/conda/envs/mambavision/bin/nvcc --generate-dependencies-with-compile --dependency-output /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.o.d -DWITH_CUDA -I/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/TH -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/THC -I/opt/conda/envs/mambavision/include -I/opt/conda/envs/mambavision/include/python3.11 -c -c /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu -o /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.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'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=DCNv3 -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu(69): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
            [&] { const auto& the_type = input.type(); constexpr const char* at_dispatch_name = "ms_deform_attn_forward_cuda"; at::ScalarType _st = ::detail::scalar_type(the_type); ; switch (_st) { case at::ScalarType::Double: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Double)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu", static_cast<uint32_t>(69), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)", "dtype '", toString(at::ScalarType::Double), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Double>; return ([&] { dcnv3_im2col_cuda( at::cuda::getCurrentCUDAStream(), input.data<scalar_t>() + n * im2col_step_ * per_input_size, offset.data<scalar_t>() + n * im2col_step_ * per_offset_size, mask.data<scalar_t>() + n * im2col_step_ * per_mask_size, columns.data<scalar_t>(), kernel_h, kernel_w, stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_w, group, group_channels, batch_n, height_in, width_in, height_out, width_out, offset_scale, remove_center); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu", static_cast<uint32_t>(69), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)", "dtype '", toString(at::ScalarType::Float), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Float>; return ([&] { dcnv3_im2col_cuda( at::cuda::getCurrentCUDAStream(), input.data<scalar_t>() + n * im2col_step_ * per_input_size, offset.data<scalar_t>() + n * im2col_step_ * per_offset_size, mask.data<scalar_t>() + n * im2col_step_ * per_mask_size, columns.data<scalar_t>(), kernel_h, kernel_w, stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_w, group, group_channels, batch_n, height_in, width_in, height_out, width_out, offset_scale, remove_center); })(); } case at::ScalarType::Half: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Half)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu", static_cast<uint32_t>(69), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)", "dtype '", toString(at::ScalarType::Half), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Half>; return ([&] { dcnv3_im2col_cuda( at::cuda::getCurrentCUDAStream(), input.data<scalar_t>() + n * im2col_step_ * per_input_size, offset.data<scalar_t>() + n * im2col_step_ * per_offset_size, mask.data<scalar_t>() + n * im2col_step_ * per_mask_size, columns.data<scalar_t>(), kernel_h, kernel_w, stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_w, group, group_channels, batch_n, height_in, width_in, height_out, width_out, offset_scale, remove_center); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu", static_cast<uint32_t>(69), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)", '"', at_dispatch_name, "\" not implemented for '", toString(_st), "'"))); }; } }()
                                                                                                                                                                          ^

  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu(147): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
            [&] { const auto& the_type = input.type(); constexpr const char* at_dispatch_name = "ms_deform_attn_backward_cuda"; at::ScalarType _st = ::detail::scalar_type(the_type); ; switch (_st) { case at::ScalarType::Double: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Double)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu", static_cast<uint32_t>(147), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)", "dtype '", toString(at::ScalarType::Double), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Double>; return ([&] { dcnv3_col2im_cuda( at::cuda::getCurrentCUDAStream(), grad_output_g.data<scalar_t>(), input.data<scalar_t>() + n * im2col_step_ * per_input_size, offset.data<scalar_t>() + n * im2col_step_ * per_offset_size, mask.data<scalar_t>() + n * im2col_step_ * per_mask_size, kernel_h, kernel_w, stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_w, group, group_channels, batch_n, height_in, width_in, height_out, width_out, offset_scale, remove_center, grad_input.data<at::opmath_type<scalar_t> >() + n * im2col_step_ * per_input_size, grad_offset.data<at::opmath_type<scalar_t> >() + n * im2col_step_ * per_offset_size, grad_mask.data<at::opmath_type<scalar_t> >() + n * im2col_step_ * per_mask_size); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu", static_cast<uint32_t>(147), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)", "dtype '", toString(at::ScalarType::Float), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Float>; return ([&] { dcnv3_col2im_cuda( at::cuda::getCurrentCUDAStream(), grad_output_g.data<scalar_t>(), input.data<scalar_t>() + n * im2col_step_ * per_input_size, offset.data<scalar_t>() + n * im2col_step_ * per_offset_size, mask.data<scalar_t>() + n * im2col_step_ * per_mask_size, kernel_h, kernel_w, stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_w, group, group_channels, batch_n, height_in, width_in, height_out, width_out, offset_scale, remove_center, grad_input.data<at::opmath_type<scalar_t> >() + n * im2col_step_ * per_input_size, grad_offset.data<at::opmath_type<scalar_t> >() + n * im2col_step_ * per_offset_size, grad_mask.data<at::opmath_type<scalar_t> >() + n * im2col_step_ * per_mask_size); })(); } case at::ScalarType::Half: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Half)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu", static_cast<uint32_t>(147), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)", "dtype '", toString(at::ScalarType::Half), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Half>; return ([&] { dcnv3_col2im_cuda( at::cuda::getCurrentCUDAStream(), grad_output_g.data<scalar_t>(), input.data<scalar_t>() + n * im2col_step_ * per_input_size, offset.data<scalar_t>() + n * im2col_step_ * per_offset_size, mask.data<scalar_t>() + n * im2col_step_ * per_mask_size, kernel_h, kernel_w, stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_w, group, group_channels, batch_n, height_in, width_in, height_out, width_out, offset_scale, remove_center, grad_input.data<at::opmath_type<scalar_t> >() + n * im2col_step_ * per_input_size, grad_offset.data<at::opmath_type<scalar_t> >() + n * im2col_step_ * per_offset_size, grad_mask.data<at::opmath_type<scalar_t> >() + n * im2col_step_ * per_mask_size); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu", static_cast<uint32_t>(147), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)", '"', at_dispatch_name, "\" not implemented for '", toString(_st), "'"))); }; } }()
                                                                                                                                                                           ^

  2 errors detected in the compilation of "/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu".
  [3/3] c++ -MMD -MF /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.o.d -pthread -B /opt/conda/envs/mambavision/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/envs/mambavision/include -fPIC -O2 -isystem /opt/conda/envs/mambavision/include -fPIC -DWITH_CUDA -I/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/TH -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/THC -I/opt/conda/envs/mambavision/include -I/opt/conda/envs/mambavision/include/python3.11 -c -c /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.cpp -o /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=DCNv3 -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
  In file included from /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.cpp:12:
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/dcnv3.h: In function 'at::Tensor dcnv3_forward(const at::Tensor&, const at::Tensor&, const at::Tensor&, int, int, int, int, int, int, int, int, int, int, float, int, int)':
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/dcnv3.h:27:19: 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]
     27 |     if (input.type().is_cuda()) {
        |         ~~~~~~~~~~^~
  In file included from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/Tensor.h:3,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/Tensor.h:3,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/function_hook.h:3,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/variable.h:6,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/extension.h:5,
                   from /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cpu/dcnv3_cpu.h:13,
                   from /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/dcnv3.h:14,
                   from /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.cpp:12:
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:30: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        |                              ^~~~
  In file included from /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.cpp:12:
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/dcnv3.h: In function 'std::vector<at::Tensor> dcnv3_backward(const at::Tensor&, const at::Tensor&, const at::Tensor&, int, int, int, int, int, int, int, int, int, int, float, const at::Tensor&, int, int)':
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/dcnv3.h:48:19: 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]
     48 |     if (input.type().is_cuda()) {
        |         ~~~~~~~~~~^~
  In file included from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/Tensor.h:3,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/Tensor.h:3,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/function_hook.h:3,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/variable.h:6,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                   from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/extension.h:5,
                   from /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cpu/dcnv3_cpu.h:13,
                   from /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/dcnv3.h:14,
                   from /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.cpp:12:
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:30: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        |                              ^~~~
  ninja: build stopped: subcommand failed.
  Traceback (most recent call last):
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 2211, in _run_ninja_build
      subprocess.run(
    File "/opt/conda/envs/mambavision/lib/python3.11/subprocess.py", line 571, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 2.

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
      main()
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
      return _build_backend().build_wheel(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/build_meta.py", line 435, in build_wheel
      return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/build_meta.py", line 423, in _build
      return self._build_with_temp_dir(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/build_meta.py", line 404, in _build_with_temp_dir
      self.run_setup()
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/build_meta.py", line 512, in run_setup
      super().run_setup(setup_script=setup_script)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
      exec(code, locals())
    File "<string>", line 62, in <module>
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/__init__.py", line 115, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 186, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
      dist.run_commands()
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
      self.run_command(cmd)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
      super().run_command(command)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
      cmd_obj.run()
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/command/bdist_wheel.py", line 370, in run
      self.run_command("build")
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
      self.distribution.run_command(command)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
      super().run_command(command)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
      cmd_obj.run()
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
      self.distribution.run_command(command)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
      super().run_command(command)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
      cmd_obj.run()
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 96, in run
      _build_ext.run(self)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 368, in run
      self.build_extensions()
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 902, in build_extensions
      build_ext.build_extensions(self)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 484, in build_extensions
      self._build_extensions_serial()
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 510, in _build_extensions_serial
      self.build_extension(ext)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 261, in build_extension
      _build_ext.build_extension(self, ext)
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 565, in build_extension
      objects = self.compiler.compile(
                ^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 715, in unix_wrap_ninja_compile
      _write_ninja_file_and_compile_objects(
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 1871, in _write_ninja_file_and_compile_objects
      _run_ninja_build(
    File "/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 2227, in _run_ninja_build
      raise RuntimeError(message) from e
  RuntimeError: Error compiling objects for extension
  error: subprocess-exited-with-error
  
  × Building wheel for DCNv3 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> No available output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /opt/conda/envs/mambavision/bin/python3.11 /opt/conda/envs/mambavision/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpkf60z76a
  cwd: /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3
  Building wheel for DCNv3 (pyproject.toml) ... error
  ERROR: Failed building wheel for DCNv3
Failed to build DCNv3                                                                                                                                                                                    
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> DCNv3

第三步

分析报错

找出报错输出中的重点信息
重点1

cpp 复制代码
 FAILED: [code=2] /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.o

返回代码为2,说明编译流程异常,当然根据FAILED也很容易看出来,有东西编译失败了,再往后看可以看见dcnv3_cuda.o这个文件出了问题,从源码中寻找相关的源代码

根据文件命名方法可以看出显然是编译dcnv3_cuda.cu文件时出了异常
重点2

cpp 复制代码
 /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu(69): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
            [&] { const auto& the_type = input.type(); constexpr const char* at_dispatch_name = "ms_deform_attn_forward_cuda"; at::ScalarType _st = ::detail::scalar_type(the_type);

可以看到正如上面的怀疑,dcnv3_cuda.cu文件在69行出现了error,继续往后看no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists说明没有合适的类型转换函数也就是说问题出在了这两个类型的转换上,那我们去源码里面看看

这里我们就可以看出问题了在新版本 PyTorch 中:

input.type() 返回的是已废弃的 const at::DeprecatedTypeProperties

应该使用 input.scalar_type() 直接获取 c10::ScalarType 类型,避免类型转换问题从一个废弃的类型转换到c10::ScalarType类型肯定会报出找不到合适的类型转换函数的错误。所以要把

cpp 复制代码
input.type(), "ms_deform_attn_forward_cuda", ([&] {

改为

cpp 复制代码
input.scalar_type(), "ms_deform_attn_forward_cuda", ([&] {

到这里我们解决了第一次发现的错误。现在我们继续往下看报错信息
重点3

cpp 复制代码
/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu(147): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
            [&] { const auto& the_type = input.type(); constexpr const char* at_dispatch_name = "ms_deform_attn_backward_cuda"; at::ScalarType _st = ::detail::scalar_type(the_type);

显然这个报错信息和重点2发现的报错信息很相似,都是同一个问题也就是无法从一个废弃的 const at::DeprecatedTypeProperties类型转换为c10::ScalarType类型。而且根据报错信息可以看到是在dcnv3_cuda.cu文件的147行

根据刚才经验我们只需要把

cpp 复制代码
input.type(), "ms_deform_attn_backward_cuda", ([&] {

修改为

cpp 复制代码
input.scalar_type(), "ms_deform_attn_forward_cuda", ([&] {

即可修复这个错误。很好,发现了两个问题而且都解决了。那我们接着看报错信息,看看还有没有其他错误
重点4

cpp 复制代码
2 errors detected in the compilation of "/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu".

编译器也在这里提示我们这个文件中发现了两个错误,显然根据刚才的分析我们已经解决了这两个问题,但是报错消息还有好多,我们不能掉以轻心,还需要分析一下后面的编译器输出结果,看看有没有遗漏的重点信息。
重点5

cpp 复制代码
 /root/local-  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/dcnv3.h:27:19: 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]

这是一个警告,告诉我们Tensor.type() 已弃用,根据dcnv3.h:27:19我们可以得知是在dcnv3.h文件的27行第19个字符上产生的警告。而且后面在告诉我们如果如果原本是想从 type() 获取相关数据,现在这些数据可以直接从 Tensor 对象本身获取:

  • 替代方案1:原本的 tensor.type().scalar_type() 改为 tensor.scalar_type()
  • 替代方案2:原本的 tensor.type().backend() 改为 tensor.device()

到这里我们可以发现貌似我们代码可能还有其他类似于使用了弃用属性的情况,我们继续看下面的编译器输出
重点6

cpp 复制代码
if (input.type().is_cuda()) {
        |         ~~~~~~~~~~^~
  In file included from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/Tensor.h:3,
cpp 复制代码
 225 |   DeprecatedTypeProperties & type() const {
        |                              ^~~~
  In file included from /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.cpp:12:

紧接着刚才重点5的警告信息出现两个错误提示,根据报错信息我们可以看见编译器贴心的给我们画了波浪线,让我们主要查看。那就结合刚才的重点5和现在的重点6我们去源代码查看一下吧,根据重点5的dcnv3.h:27:19提示我们优先去排查dcnv3.h文件的27行第19个字符

显然可以发现这dcnv3.h文件的27行代码是有问题的和重点5我们看见的警告一样,代码使用了废弃的API,警告中也告诉了我们解决这个问题的方法,那么我们根据重点5的警告提示把代码修改过来也就是把

cpp 复制代码
    if (input.type().is_cuda()) {

换成

cpp 复制代码
    if (input.is_cuda()) {

第二个错误

cpp 复制代码
/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:30: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        |                              ^~~~

这并不在我们的相关代码中,这个错误指向了torch内部,一般情况下torch内部不会出现问题的,这个错误可能是上面的错误引发的连锁反应,我们可以暂且搁置,看看其他报错解决完后这些错误会不会一并自动被解决。我们继续阅读报错代码看看剩下的代码中还有什么有用的信息
重点7

cpp 复制代码
 /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/dcnv3.h:48:19: 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]
     48 |     if (input.type().is_cuda()) {
        |         ~~~~~~~~~~^~
  In file included from /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/Tensor.h:3,
cpp 复制代码
/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:30: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        |                              ^~~~
  ninja: build stopped: subcommand failed.

和重点5重点6一样的警告和报错我们如法炮制来修复这个错误,根据dcnv3.h:48:19提示我们可以从dcnv3.h文件的48行第19个字符入手

根据上面的经验也就是说要把

cpp 复制代码
    if (input.type().is_cuda()) {

改为

cpp 复制代码
    if (input.is_cuda()) {

至此我们阅读完了所有的报错信息,成功修复了四处错误,我们可以进行下一步操作了。

尝试重新编译

再次执行编译指令

cpp 复制代码
pip install --no-build-isolation . --verbose

编译成功

cpp 复制代码
(mambavision) root@b6cd5030aebc:~/local-disk/workspace/DAMamba/classification/models/ops_dcnv3# pip install --no-build-isolation . --verbose
Using pip 25.3 from /opt/conda/envs/mambavision/lib/python3.11/site-packages/pip (python 3.11)
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Processing /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3
  Running command Preparing metadata (pyproject.toml)
  running dist_info
  creating /tmp/pip-modern-metadata-fy4603pq/DCNv3.egg-info
  writing /tmp/pip-modern-metadata-fy4603pq/DCNv3.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-modern-metadata-fy4603pq/DCNv3.egg-info/dependency_links.txt
  writing top-level names to /tmp/pip-modern-metadata-fy4603pq/DCNv3.egg-info/top_level.txt
  writing manifest file '/tmp/pip-modern-metadata-fy4603pq/DCNv3.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-modern-metadata-fy4603pq/DCNv3.egg-info/SOURCES.txt'
  writing manifest file '/tmp/pip-modern-metadata-fy4603pq/DCNv3.egg-info/SOURCES.txt'
  creating '/tmp/pip-modern-metadata-fy4603pq/dcnv3-1.1.dist-info'
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: DCNv3
  Running command Building wheel for DCNv3 (pyproject.toml)
  running bdist_wheel
  running build
  running build_py
  copying functions/__init__.py -> build/lib.linux-x86_64-cpython-311/functions
  copying functions/dcnv3_func.py -> build/lib.linux-x86_64-cpython-311/functions
  running build_ext
  building 'DCNv3' extension
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/utils/cpp_extension.py:2061: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
  If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
    warnings.warn(
  Emitting ninja build file /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/build.ninja...
  Compiling objects...
  Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
  [1/2] c++ -MMD -MF /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.o.d -pthread -B /opt/conda/envs/mambavision/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/envs/mambavision/include -fPIC -O2 -isystem /opt/conda/envs/mambavision/include -fPIC -DWITH_CUDA -I/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/TH -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/THC -I/opt/conda/envs/mambavision/include -I/opt/conda/envs/mambavision/include/python3.11 -c -c /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.cpp -o /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=DCNv3 -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
  [2/2] /opt/conda/envs/mambavision/bin/nvcc --generate-dependencies-with-compile --dependency-output /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.o.d -DWITH_CUDA -I/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/TH -I/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/THC -I/opt/conda/envs/mambavision/include -I/opt/conda/envs/mambavision/include/python3.11 -c -c /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu -o /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.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'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=DCNv3 -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu: In function 'at::Tensor dcnv3_cuda_forward(const at::Tensor&, const at::Tensor&, const at::Tensor&, int, int, int, int, int, int, int, int, int, int, float, int, int)':
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:32:61: 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]
     32 |     AT_ASSERTM(input.type().is_cuda(), "input must be a CUDA tensor");
        |                                                   ~~~~~~~~~~^~
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:1: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:33:62: 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]
     33 |     AT_ASSERTM(offset.type().is_cuda(), "offset must be a CUDA tensor");
        |                                                   ~~~~~~~~~~~^~
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:1: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:34:60: 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]
     34 |     AT_ASSERTM(mask.type().is_cuda(), "mask must be a CUDA tensor");
        |                                                   ~~~~~~~~~^~
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:1: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu: In lambda function:
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:986: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:1059: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:1131: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:1204: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu: In lambda function:
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:2183: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:2255: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:2326: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:2398: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu: In lambda function:
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:3377: warning: 'T* at::Tensor::data() const [with T = c10::Half]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:3453: warning: 'T* at::Tensor::data() const [with T = c10::Half]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:3528: warning: 'T* at::Tensor::data() const [with T = c10::Half]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:69:3604: warning: 'T* at::Tensor::data() const [with T = c10::Half]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
     69 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu: In function 'std::vector<at::Tensor> dcnv3_cuda_backward(const at::Tensor&, const at::Tensor&, const at::Tensor&, int, int, int, int, int, int, int, int, int, int, float, const at::Tensor&, int, int)':
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:101:61: 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]
    101 |     AT_ASSERTM(input.type().is_cuda(), "input must be a CUDA tensor");
        |                                                   ~~~~~~~~~~^~
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:1: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:102:62: 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]
    102 |     AT_ASSERTM(offset.type().is_cuda(), "offset must be a CUDA tensor");
        |                                                   ~~~~~~~~~~~^~
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:1: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:103:60: 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]
    103 |     AT_ASSERTM(mask.type().is_cuda(), "mask must be a CUDA tensor");
        |                                                   ~~~~~~~~~^~
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:1: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:104:67: 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]
    104 |     AT_ASSERTM(grad_output.type().is_cuda(),
        |                                                                   ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:1: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu: In lambda function:
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:996: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:1022: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:1095: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:1167: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:1426: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:1504: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:1581: warning: 'T* at::Tensor::data() const [with T = double]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu: In lambda function:
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:2431: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:2456: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:2528: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:2599: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:2857: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:2934: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:3010: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu: In lambda function:
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:3860: warning: 'T* at::Tensor::data() const [with T = c10::Half]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:3889: warning: 'T* at::Tensor::data() const [with T = c10::Half]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:3965: warning: 'T* at::Tensor::data() const [with T = c10::Half]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147:4040: warning: 'T* at::Tensor::data() const [with T = c10::Half]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.cu:147: warning: 'T* at::Tensor::data() const [with T = float]' is deprecated: Tensor.data<T>() is deprecated. Please use Tensor.data_ptr<T>() instead. [-Wdeprecated-declarations]
    147 |         AT_DISPATCH_FLOATING_TYPES_AND_HALF(
        |
  /opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:247:1: note: declared here
    247 |   T * data() const {
        | ^ ~~
  g++ -pthread -B /opt/conda/envs/mambavision/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/envs/mambavision/include -fPIC -O2 -isystem /opt/conda/envs/mambavision/include -shared /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cpu/dcnv3_cpu.o /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/cuda/dcnv3_cuda.o /root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/build/temp.linux-x86_64-cpython-311/root/local-disk/workspace/DAMamba/classification/models/ops_dcnv3/src/vision.o -L/opt/conda/envs/mambavision/lib/python3.11/site-packages/torch/lib -L/opt/conda/envs/mambavision/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-cpython-311/DCNv3.cpython-311-x86_64-linux-gnu.so
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.linux-x86_64/wheel
  creating build/bdist.linux-x86_64/wheel/functions
  copying build/lib.linux-x86_64-cpython-311/functions/__init__.py -> build/bdist.linux-x86_64/wheel/./functions
  copying build/lib.linux-x86_64-cpython-311/functions/dcnv3_func.py -> build/bdist.linux-x86_64/wheel/./functions
  copying build/lib.linux-x86_64-cpython-311/DCNv3.cpython-311-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/.
  running install_egg_info
  running egg_info
  creating DCNv3.egg-info
  writing DCNv3.egg-info/PKG-INFO
  writing dependency_links to DCNv3.egg-info/dependency_links.txt
  writing top-level names to DCNv3.egg-info/top_level.txt
  writing manifest file 'DCNv3.egg-info/SOURCES.txt'
  reading manifest file 'DCNv3.egg-info/SOURCES.txt'
  writing manifest file 'DCNv3.egg-info/SOURCES.txt'
  Copying DCNv3.egg-info to build/bdist.linux-x86_64/wheel/./DCNv3-1.1-py3.11.egg-info
  running install_scripts
  creating build/bdist.linux-x86_64/wheel/dcnv3-1.1.dist-info/WHEEL
  creating '/tmp/pip-ephem-wheel-cache-0xgwpn6q/wheels/18/bb/9c/c3321148f05bd2d76c93e49b91b31682f80d2cd3e4fe2ab5ba/tmpzzcs1lik/.tmp-xxbu3q15/dcnv3-1.1-cp311-cp311-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
  adding 'DCNv3.cpython-311-x86_64-linux-gnu.so'
  adding 'functions/__init__.py'
  adding 'functions/dcnv3_func.py'
  adding 'dcnv3-1.1.dist-info/METADATA'
  adding 'dcnv3-1.1.dist-info/WHEEL'
  adding 'dcnv3-1.1.dist-info/top_level.txt'
  adding 'dcnv3-1.1.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
  Building wheel for DCNv3 (pyproject.toml) ... done
  Created wheel for DCNv3: filename=dcnv3-1.1-cp311-cp311-linux_x86_64.whl size=358200 sha256=05b0f620d10bfd1d2d635dd0c18f12a1072bd094c6c08ad73551bd6c3f5b625c
  Stored in directory: /tmp/pip-ephem-wheel-cache-0xgwpn6q/wheels/18/bb/9c/c3321148f05bd2d76c93e49b91b31682f80d2cd3e4fe2ab5ba
Successfully built DCNv3
Installing collected packages: DCNv3
Successfully installed DCNv3-1.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.                                       
(mambavision) root@b6cd5030aebc:~/local-disk/workspace/DAMamba/classification/models/ops_dcnv3#          
相关推荐
风途知识百科2 小时前
小型车载自动气象站
人工智能·数码相机
TonyLee0172 小时前
卷积操作记录(pytorch)
人工智能·pytorch·深度学习
小鸡吃米…2 小时前
机器学习所需技能
人工智能·机器学习
小马过河R2 小时前
ReAct和Function Calling之间的纠葛与恩恩怨怨
人工智能·语言模型·agent·智能体
HySpark2 小时前
基于声纹预处理技术的智能语音识别实现
人工智能·语音识别
m5655bj2 小时前
通过 Python 提取 PDF 表格数据
服务器·python·pdf
l1m0_2 小时前
UI设计规范工程化,AI生成Ant Design设计稿流程拆解
人工智能·ui·产品经理·设计·arco design·设计规范
kong79069282 小时前
使用SpringAI实现对话机器人
人工智能·对话机器人·springai·deepseek
玄同7652 小时前
面向对象编程 vs 其他编程范式:LLM 开发该选哪种?
大数据·开发语言·前端·人工智能·python·自然语言处理·知识图谱