Grounded-Segment-Anything icon indicating copy to clipboard operation
Grounded-Segment-Anything copied to clipboard

CUDA 12 is suppported?

Open zhangzhiqiangcs opened this issue 9 months ago • 3 comments

In README the cuda version is 11.3, when run 'pip install -e GroundingDINO -v' got the error

  Compiling objects...
  Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
  [1/4] /usr/local/cuda-12.1/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/cuda_version.o.d -DWITH_CUDA -I/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/TH -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/THC -I/usr/local/cuda-12.1/include -I/home/xx/anaconda3/envs/vllm/include/python3.11 -c -c /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/cuda_version.cu -o /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/cuda_version.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'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17
  [2/4] c++ -MMD -MF /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.o.d -pthread -B /home/xx/anaconda3/envs/vllm/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/xx/anaconda3/envs/vllm/include -fPIC -O2 -isystem /home/xx/anaconda3/envs/vllm/include -fPIC -DWITH_CUDA -I/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/TH -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/THC -I/usr/local/cuda-12.1/include -I/home/xx/anaconda3/envs/vllm/include/python3.11 -c -c /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.cpp -o /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
  [3/4] /usr/local/cuda-12.1/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.o.d -DWITH_CUDA -I/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/TH -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/THC -I/usr/local/cuda-12.1/include -I/home/xx/anaconda3/envs/vllm/include/python3.11 -c -c /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu -o /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_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'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17
  FAILED: /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.o
  /usr/local/cuda-12.1/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.o.d -DWITH_CUDA -I/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/TH -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/THC -I/usr/local/cuda-12.1/include -I/home/xx/anaconda3/envs/vllm/include/python3.11 -c -c /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu -o /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_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'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17
  /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu(66): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
                [&] { const auto& the_type = value.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__, "/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu", static_cast<uint32_t>(66), (::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 ([&] { ms_deformable_im2col_cuda(at::cuda::getCurrentCUDAStream(), value.data<scalar_t>() + n * im2col_step_ * per_value_size, spatial_shapes.data<int64_t>(), level_start_index.data<int64_t>(), sampling_loc.data<scalar_t>() + n * im2col_step_ * per_sample_loc_size, attn_weight.data<scalar_t>() + n * im2col_step_ * per_attn_weight_size, batch_n, spatial_size, num_heads, channels, num_levels, num_query, num_point, columns.data<scalar_t>()); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu", static_cast<uint32_t>(66), (::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 ([&] { ms_deformable_im2col_cuda(at::cuda::getCurrentCUDAStream(), value.data<scalar_t>() + n * im2col_step_ * per_value_size, spatial_shapes.data<int64_t>(), level_start_index.data<int64_t>(), sampling_loc.data<scalar_t>() + n * im2col_step_ * per_sample_loc_size, attn_weight.data<scalar_t>() + n * im2col_step_ * per_attn_weight_size, batch_n, spatial_size, num_heads, channels, num_levels, num_query, num_point, columns.data<scalar_t>()); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu", static_cast<uint32_t>(66), (::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), "'"))); }; } }()
                                                                                                                                                                              ^

  /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu(133): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
                [&] { const auto& the_type = value.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__, "/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu", static_cast<uint32_t>(133), (::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 ([&] { ms_deformable_col2im_cuda(at::cuda::getCurrentCUDAStream(), grad_output_g.data<scalar_t>(), value.data<scalar_t>() + n * im2col_step_ * per_value_size, spatial_shapes.data<int64_t>(), level_start_index.data<int64_t>(), sampling_loc.data<scalar_t>() + n * im2col_step_ * per_sample_loc_size, attn_weight.data<scalar_t>() + n * im2col_step_ * per_attn_weight_size, batch_n, spatial_size, num_heads, channels, num_levels, num_query, num_point, grad_value.data<scalar_t>() + n * im2col_step_ * per_value_size, grad_sampling_loc.data<scalar_t>() + n * im2col_step_ * per_sample_loc_size, grad_attn_weight.data<scalar_t>() + n * im2col_step_ * per_attn_weight_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__, "/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu", static_cast<uint32_t>(133), (::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 ([&] { ms_deformable_col2im_cuda(at::cuda::getCurrentCUDAStream(), grad_output_g.data<scalar_t>(), value.data<scalar_t>() + n * im2col_step_ * per_value_size, spatial_shapes.data<int64_t>(), level_start_index.data<int64_t>(), sampling_loc.data<scalar_t>() + n * im2col_step_ * per_sample_loc_size, attn_weight.data<scalar_t>() + n * im2col_step_ * per_attn_weight_size, batch_n, spatial_size, num_heads, channels, num_levels, num_query, num_point, grad_value.data<scalar_t>() + n * im2col_step_ * per_value_size, grad_sampling_loc.data<scalar_t>() + n * im2col_step_ * per_sample_loc_size, grad_attn_weight.data<scalar_t>() + n * im2col_step_ * per_attn_weight_size); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu", static_cast<uint32_t>(133), (::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 "/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu".
  [4/4] c++ -MMD -MF /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.o.d -pthread -B /home/xx/anaconda3/envs/vllm/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/xx/anaconda3/envs/vllm/include -fPIC -O2 -isystem /home/xx/anaconda3/envs/vllm/include -fPIC -DWITH_CUDA -I/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/TH -I/tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/THC -I/usr/local/cuda-12.1/include -I/home/xx/anaconda3/envs/vllm/include/python3.11 -c -c /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.cpp -o /tmp/tmp529urx00.build-temp/home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
  In file included from /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.cpp:3:
  /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h: In function ‘at::Tensor groundingdino::ms_deform_attn_forward(const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, int)’:
  /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h:30: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]
     30 |     if (value.type().is_cuda())
        |         ~~~~~~~~~~^~
  In file included from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/ATen/core/Tensor.h:3,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/ATen/Tensor.h:3,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/function_hook.h:3,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/variable.h:6,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/extension.h:5,
                   from /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.h:12,
                   from /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h:13,
                   from /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.cpp:3:
  /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:30: note: declared here
    225 |   DeprecatedTypeProperties & type() const {
        |                              ^~~~
  In file included from /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.cpp:3:
  /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h: In function ‘std::vector<at::Tensor> groundingdino::ms_deform_attn_backward(const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, int)’:
  /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h:52: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]
     52 |     if (value.type().is_cuda())
        |         ~~~~~~~~~~^~
  In file included from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/ATen/core/Tensor.h:3,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/ATen/Tensor.h:3,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/function_hook.h:3,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/variable.h:6,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                   from /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/torch/extension.h:5,
                   from /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.h:12,
                   from /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h:13,
                   from /home/xx/tutorial/practice/007/Grounded-Segment-Anything/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.cpp:3:
  /tmp/pip-build-env-o_vo94lf/overlay/lib/python3.11/site-packages/torch/include/ATen/core/TensorBody.h:225:30: note: declared here
    225 |   DeprecatedTypeProperties & type() const {

nvcc info

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0

cuda info

 CUDA Version: 12.6

pytorch info

torch                             1.13.1
torchvision                       0.19.0

zhangzhiqiangcs avatar Mar 03 '25 00:03 zhangzhiqiangcs

got any answer?

Ahmaddimran avatar Jul 29 '25 03:07 Ahmaddimran

any

yuchenlichuck avatar Aug 28 '25 19:08 yuchenlichuck

Try this patch: https://github.com/IDEA-Research/GroundingDINO/pull/383

nadunRanawaka1 avatar Oct 10 '25 02:10 nadunRanawaka1