GroundingDINO icon indicating copy to clipboard operation
GroundingDINO copied to clipboard

Torch 2.7 and CUDA 12.8 compile failing for RTX 5000 series

Open FurkanGozukara opened this issue 10 months ago • 5 comments

I had successfully compiled before for Torch 2.5 but Torch 2.7 and CUDA 12.8 failing

CUDA 12.8 needed for RTX 5000 series

tested with ninja as well error again

(venv) E:\Ulti_Img_Process_V12\GroundingDINO>python setup.py build_ext bdist_wheel
Building wheel groundingdino-0.1.0
Compiling with CUDA
running build_ext
E:\Ulti_Img_Process_V12\venv\lib\site-packages\torch\utils\cpp_extension.py:576: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
building 'groundingdino._C' extension
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWITH_CUDA -IE:\Ulti_Img_Process_V12\GroundingDINO\groundingdino\models\GroundingDINO\csrc -IE:\Ulti_Img_Process_V12\venv\lib\site-packages\torch\include -IE:\Ulti_Img_Process_V12\venv\lib\site-packages\torch\include\torch\csrc\api\include "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include" -IE:\Ulti_Img_Process_V12\venv\include -IC:\Python310\include -IC:\Python310\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /TpE:\Ulti_Img_Process_V12\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cpu.cpp /Fobuild\temp.win-amd64-cpython-310\Release\Ulti_Img_Process_V12\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cpu.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++17
ms_deform_attn_cpu.cpp
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(434): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(438): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(442): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(446): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(450): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(454): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(458): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(462): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(466): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(470): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(474): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(478): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(482): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(486): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(490): warning C4996: 'cusparseColorInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(494): warning C4996: 'cusparseColorInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(498): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(502): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(767): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(782): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(797): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(812): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(827): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(842): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(857): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(872): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(887): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(902): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(903): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(918): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(919): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(934): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(935): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(950): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(951): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(967): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(970): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(986): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(989): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1005): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1008): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1024): warning C4996: 'bsrsv2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1027): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1125): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1142): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1159): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1176): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1193): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1210): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1227): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1244): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1261): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1278): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1279): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1296): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1297): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1314): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1315): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1332): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1333): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1351): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1356): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1374): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1379): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1397): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1402): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1420): warning C4996: 'bsrsm2Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1425): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1435): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1443): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1451): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1459): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1467): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1479): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1491): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1503): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1515): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1527): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1539): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1551): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1563): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1575): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1576): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1588): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1589): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1601): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1602): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1614): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1615): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1627): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1628): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1640): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1641): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1653): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1654): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1666): warning C4996: 'csrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1667): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1673): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1681): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1689): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1697): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1705): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1719): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1733): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1747): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1761): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1775): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1789): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1803): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1817): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1831): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1832): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1846): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1847): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1861): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1862): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1876): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1877): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1891): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1892): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1906): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1907): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1921): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1922): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1936): warning C4996: 'bsrilu02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1937): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1943): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1955): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1967): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1979): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(1991): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2003): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2015): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2027): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2039): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2051): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2052): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2064): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2065): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2077): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2078): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2090): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2091): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2103): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2104): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2116): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2117): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2129): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2130): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2142): warning C4996: 'csric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2143): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2149): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2163): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2177): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2191): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2205): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2219): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2233): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2247): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2261): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2275): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2276): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2290): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2291): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2305): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2306): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2320): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2321): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2335): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2336): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2350): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2351): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2366): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2367): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2381): warning C4996: 'bsric02Info_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(2382): warning C4996: 'cusparseSolvePolicy_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(3055): warning C4996: 'cusparseColorInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(3070): warning C4996: 'cusparseColorInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(3085): warning C4996: 'cusparseColorInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(3100): warning C4996: 'cusparseColorInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4181): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4193): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4205): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4217): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4230): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4243): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4256): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4269): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4282): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4295): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4308): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4321): warning C4996: 'csru2csrInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4630): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4648): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4664): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4681): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4697): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4712): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4729): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4746): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4761): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4782): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4803): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4822): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4842): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4862): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4880): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4900): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4920): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include\cusparse.h(4938): warning C4996: 'pruneInfo_t': The type will be removed in the next major release
E:\Ulti_Img_Process_V12\venv\lib\site-packages\torch\utils\cpp_extension.py:2322: 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(
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\bin\nvcc" -c E:\Ulti_Img_Process_V12\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cuda.cu -o build\temp.win-amd64-cpython-310\Release\Ulti_Img_Process_V12\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cuda.obj -IE:\Ulti_Img_Process_V12\GroundingDINO\groundingdino\models\GroundingDINO\csrc -IE:\Ulti_Img_Process_V12\venv\lib\site-packages\torch\include -IE:\Ulti_Img_Process_V12\venv\lib\site-packages\torch\include\torch\csrc\api\include "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include" -IE:\Ulti_Img_Process_V12\venv\include -IC:\Python310\include -IC:\Python310\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_120,code=sm_120 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++17 --use-local-env
ms_deform_attn_cuda.cu
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8/include\cuda/std/detail/libcxx/include/cmath(1032): warning #221-D: floating-point value does not fit in required floating-point type
    if (__r >= ::nextafter(static_cast<_RealT>(_MaxVal), ((float)(1e+300))))
                                                          ^

Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"

E:\Ulti_Img_Process_V12\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cuda.cu(65): 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__, "E:\\Ulti_Img_Process_V12\\GroundingDINO\\groundingdino\\models\\GroundingDINO\\csrc\\MsDeformAttn\\ms_deform_attn_cuda.cu", static_cast<uint32_t>(75), (::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__, "E:\\Ulti_Img_Process_V12\\GroundingDINO\\groundingdino\\models\\GroundingDINO\\csrc\\MsDeformAttn\\ms_deform_attn_cuda.cu", static_cast<uint32_t>(75), (::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__, "E:\\Ulti_Img_Process_V12\\GroundingDINO\\groundingdino\\models\\GroundingDINO\\csrc\\MsDeformAttn\\ms_deform_attn_cuda.cu", static_cast<uint32_t>(75), (::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), "'"))); }; } }();

                                                ^

E:\Ulti_Img_Process_V12\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cuda.cu(135): 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__, "E:\\Ulti_Img_Process_V12\\GroundingDINO\\groundingdino\\models\\GroundingDINO\\csrc\\MsDeformAttn\\ms_deform_attn_cuda.cu", static_cast<uint32_t>(148), (::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__, "E:\\Ulti_Img_Process_V12\\GroundingDINO\\groundingdino\\models\\GroundingDINO\\csrc\\MsDeformAttn\\ms_deform_attn_cuda.cu", static_cast<uint32_t>(148), (::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__, "E:\\Ulti_Img_Process_V12\\GroundingDINO\\groundingdino\\models\\GroundingDINO\\csrc\\MsDeformAttn\\ms_deform_attn_cuda.cu", static_cast<uint32_t>(148), (::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 "E:/Ulti_Img_Process_V12/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu".
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.8\\bin\\nvcc.exe' failed with exit code 2

(venv) E:\Ulti_Img_Process_V12\GroundingDINO>

FurkanGozukara avatar Mar 06 '25 09:03 FurkanGozukara

https://github.com/IDEA-Research/GroundingDINO/pull/393 https://github.com/IDEA-Research/GroundingDINO/tree/34ef00dcdf5cadb84c21b59db4fc42a4d4c75047

I also have this question

This version Compatible with CUDA12.8 Test passed

monkeycc avatar Apr 22 '25 08:04 monkeycc

Installation works for me on 5090 + pip installed torch2.7.1+cu128 by modifying L65, 135 in ms_deform_attn_cuda.cu from type() -> scalar_type()

cremebrule avatar Jun 30 '25 18:06 cremebrule

scalar_type

The problem has been resolved, thank you.

Maxwell0710 avatar Jul 11 '25 04:07 Maxwell0710

Just use this:

/*!
**************************************************************************************************
* Deformable DETR
* Copyright (c) 2020 SenseTime. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 [see LICENSE for details]
**************************************************************************************************
* Modified from https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/tree/pytorch_1.0.0
**************************************************************************************************
*/

#include <vector>
#include "ms_deform_im2col_cuda.cuh"

#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <cuda.h>
#include <cuda_runtime.h>

namespace groundingdino {

at::Tensor ms_deform_attn_cuda_forward(
    const at::Tensor &value, 
    const at::Tensor &spatial_shapes,
    const at::Tensor &level_start_index,
    const at::Tensor &sampling_loc,
    const at::Tensor &attn_weight,
    const int im2col_step)
{
    AT_ASSERTM(value.is_contiguous(), "value tensor has to be contiguous");
    AT_ASSERTM(spatial_shapes.is_contiguous(), "spatial_shapes tensor has to be contiguous");
    AT_ASSERTM(level_start_index.is_contiguous(), "level_start_index tensor has to be contiguous");
    AT_ASSERTM(sampling_loc.is_contiguous(), "sampling_loc tensor has to be contiguous");
    AT_ASSERTM(attn_weight.is_contiguous(), "attn_weight tensor has to be contiguous");

    AT_ASSERTM(value.is_cuda(), "value must be a CUDA tensor");
    AT_ASSERTM(spatial_shapes.is_cuda(), "spatial_shapes must be a CUDA tensor");
    AT_ASSERTM(level_start_index.is_cuda(), "level_start_index must be a CUDA tensor");
    AT_ASSERTM(sampling_loc.is_cuda(), "sampling_loc must be a CUDA tensor");
    AT_ASSERTM(attn_weight.is_cuda(), "attn_weight must be a CUDA tensor");

    const int batch = value.size(0);
    const int spatial_size = value.size(1);
    const int num_heads = value.size(2);
    const int channels = value.size(3);

    const int num_levels = spatial_shapes.size(0);

    const int num_query = sampling_loc.size(1);
    const int num_point = sampling_loc.size(4);

    const int im2col_step_ = std::min(batch, im2col_step);

    AT_ASSERTM(batch % im2col_step_ == 0, "batch(%d) must divide im2col_step(%d)", batch, im2col_step_);
    
    auto output = at::zeros({batch, num_query, num_heads, channels}, value.options());

    const int batch_n = im2col_step_;
    auto output_n = output.view({batch/im2col_step_, batch_n, num_query, num_heads, channels});
    auto per_value_size = spatial_size * num_heads * channels;
    auto per_sample_loc_size = num_query * num_heads * num_levels * num_point * 2;
    auto per_attn_weight_size = num_query * num_heads * num_levels * num_point;
    for (int n = 0; n < batch/im2col_step_; ++n)
    {
        auto columns = output_n.select(0, n);
        AT_DISPATCH_FLOATING_TYPES(value.scalar_type(), "ms_deform_attn_forward_cuda", ([&] {
            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>());

        }));
    }

    output = output.view({batch, num_query, num_heads*channels});

    return output;
}


std::vector<at::Tensor> ms_deform_attn_cuda_backward(
    const at::Tensor &value, 
    const at::Tensor &spatial_shapes,
    const at::Tensor &level_start_index,
    const at::Tensor &sampling_loc,
    const at::Tensor &attn_weight,
    const at::Tensor &grad_output,
    const int im2col_step)
{

    AT_ASSERTM(value.is_contiguous(), "value tensor has to be contiguous");
    AT_ASSERTM(spatial_shapes.is_contiguous(), "spatial_shapes tensor has to be contiguous");
    AT_ASSERTM(level_start_index.is_contiguous(), "level_start_index tensor has to be contiguous");
    AT_ASSERTM(sampling_loc.is_contiguous(), "sampling_loc tensor has to be contiguous");
    AT_ASSERTM(attn_weight.is_contiguous(), "attn_weight tensor has to be contiguous");
    AT_ASSERTM(grad_output.is_contiguous(), "grad_output tensor has to be contiguous");

    AT_ASSERTM(value.is_cuda(), "value must be a CUDA tensor");
    AT_ASSERTM(spatial_shapes.is_cuda(), "spatial_shapes must be a CUDA tensor");
    AT_ASSERTM(level_start_index.is_cuda(), "level_start_index must be a CUDA tensor");
    AT_ASSERTM(sampling_loc.is_cuda(), "sampling_loc must be a CUDA tensor");
    AT_ASSERTM(attn_weight.is_cuda(), "attn_weight must be a CUDA tensor");
    AT_ASSERTM(grad_output.is_cuda(), "grad_output must be a CUDA tensor");

    const int batch = value.size(0);
    const int spatial_size = value.size(1);
    const int num_heads = value.size(2);
    const int channels = value.size(3);

    const int num_levels = spatial_shapes.size(0);

    const int num_query = sampling_loc.size(1);
    const int num_point = sampling_loc.size(4);

    const int im2col_step_ = std::min(batch, im2col_step);

    AT_ASSERTM(batch % im2col_step_ == 0, "batch(%d) must divide im2col_step(%d)", batch, im2col_step_);

    auto grad_value = at::zeros_like(value);
    auto grad_sampling_loc = at::zeros_like(sampling_loc);
    auto grad_attn_weight = at::zeros_like(attn_weight);

    const int batch_n = im2col_step_;
    auto per_value_size = spatial_size * num_heads * channels;
    auto per_sample_loc_size = num_query * num_heads * num_levels * num_point * 2;
    auto per_attn_weight_size = num_query * num_heads * num_levels * num_point;
    auto grad_output_n = grad_output.view({batch/im2col_step_, batch_n, num_query, num_heads, channels});
    
    for (int n = 0; n < batch/im2col_step_; ++n)
    {
        auto grad_output_g = grad_output_n.select(0, n);
        AT_DISPATCH_FLOATING_TYPES(value.scalar_type(), "ms_deform_attn_backward_cuda", ([&] {
            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);

        }));
    }

    return {
        grad_value, grad_sampling_loc, grad_attn_weight
    };
}

} // namespace groundingdino

PetropoulakisPanagiotis avatar Jul 14 '25 10:07 PetropoulakisPanagiotis

Installation works for me on 5090 + pip installed torch2.7.1+cu128 by modifying L65, 135 in ms_deform_attn_cuda.cu from type() -> scalar_type()

Thanks, you save my day

ZainZh avatar Sep 04 '25 07:09 ZainZh