-
Notifications
You must be signed in to change notification settings - Fork 25
Description
你好,我在运行检测新版本cuda_new时候,进行了环境配置后,出现报错信息:
`
Using /home/dkx/.cache/torch_extensions/py38_cu113 as PyTorch extensions root...
Detected CUDA files, patching ldflags
Emitting ninja build file /home/dkx/.cache/torch_extensions/py38_cu113/bi_wkv/build.ninja...
Building extension module bi_wkv...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=bi_wkv -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include -isystem /home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/TH -isystem /home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/THC -isystem /home/dkx/.conda/envs/py38/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS_ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -res-usage --maxrregcount 60 --use_fast_math -O3 -Xptxas -O3 -gencode arch=compute_86,code=sm_86 -std=c++14 -c /home/dkx/myPythonProject/RayDN-main/detection/mmdet_custom/models/backbones/base/cuda_new/bi_wkv_kernel.cu -o bi_wkv_kernel.cuda.o
FAILED: bi_wkv_kernel.cuda.o
/usr/bin/nvcc -DTORCH_EXTENSION_NAME=bi_wkv -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include -isystem /home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/TH -isystem /home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/THC -isystem /home/dkx/.conda/envs/py38/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS_ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --compiler-options '-fPIC' -res-usage --maxrregcount 60 --use_fast_math -O3 -Xptxas -O3 -gencode arch=compute_86,code=sm_86 -std=c++14 -c /home/dkx/myPythonProject/RayDN-main/detection/mmdet_custom/models/backbones/base/cuda_new/bi_wkv_kernel.cu -o bi_wkv_kernel.cuda.o
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
/usr/include/c++/11/type_traits(1406): error: identifier "__is_same" is undefined
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Metaprogramming.h(425): error: no instance of constructor "std::tuple<_T1, _T2>::tuple [with _T1=int32_t &&, _T2=int32_t]" matches the argument list
argument types are: (int32_t, int)
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Metaprogramming.h(423): error: no instance of overloaded function "c10::guts::detail::extract_tuple_element_by_index" matches the argument list
argument types are: (std::tuple<int32_t>, )
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/ScalarTypeToTypeMeta.h(35): error: no suitable constructor exists to convert from "c10::ScalarType" to "c10::optionalc10::ScalarType"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(148): error: no suitable constructor exists to convert from "c10::Layout" to "c10::optionalc10::Layout"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(177): error: no instance of overloaded function "c10::TensorOptions::set_dtype" matches the argument list
argument types are: (caffe2::TypeMeta)
object type is: c10::TensorOptions
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(182): error: no instance of overloaded function "c10::TensorOptions::set_dtype" matches the argument list
argument types are: (c10::ScalarType)
object type is: c10::TensorOptions
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(187): error: no suitable constructor exists to convert from "c10::MemoryFormat" to "c10::optionalc10::MemoryFormat"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(1215): error: no instance of constructor "c10::optional::optional [with T=c10::Device]" matches the argument list
argument types are: (const c10::Device)
detected during instantiation of "c10::optional<std::decay::type> c10::make_optional(T &&) [with T=const c10::Device &]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(287): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(1215): error: no instance of constructor "c10::optional::optional [with T=caffe2::TypeMeta]" matches the argument list
argument types are: (const caffe2::TypeMeta)
detected during instantiation of "c10::optional<std::decay::type> c10::make_optional(T &&) [with T=const caffe2::TypeMeta &]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(308): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(1215): error: no instance of constructor "c10::optional::optional [with T=c10::Layout]" matches the argument list
argument types are: (const c10::Layout)
detected during instantiation of "c10::optional<std::decay::type> c10::make_optional(T &&) [with T=const c10::Layout &]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(324): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(1215): error: no instance of constructor "c10::optional::optional [with T=__nv_bool]" matches the argument list
argument types are: (const __nv_bool)
detected during instantiation of "c10::optional<std::decay::type> c10::make_optional(T &&) [with T=const __nv_bool &]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(341): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(1215): error: no instance of constructor "c10::optional::optional [with T=c10::MemoryFormat]" matches the argument list
argument types are: (const c10::MemoryFormat)
detected during instantiation of "c10::optional<std::decay::type> c10::make_optional(T &&) [with T=const c10::MemoryFormat &]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(388): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(430): error: no suitable constructor exists to convert from "c10::MemoryFormat" to "c10::optionalc10::MemoryFormat"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(568): error: no instance of overloaded function "c10::TensorOptions::dtype" matches the argument list
argument types are: (caffe2::TypeMeta)
object type is: c10::TensorOptions
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(573): error: no instance of overloaded function "c10::TensorOptions::dtype" matches the argument list
argument types are: (caffe2::TypeMeta)
object type is: c10::TensorOptions
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(579): error: no instance of overloaded function "c10::TensorOptions::layout" matches the argument list
argument types are: (c10::Layout)
object type is: c10::TensorOptions
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(598): error: no instance of overloaded function "c10::TensorOptions::requires_grad" matches the argument list
argument types are: (__nv_bool)
object type is: c10::TensorOptions
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(604): error: no suitable constructor exists to convert from "c10::MemoryFormat" to "c10::optionalc10::MemoryFormat"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorOptions.h(828): error: no instance of overloaded function "c10::TensorOptions::layout" matches the argument list
argument types are: (c10::Layout)
object type is: c10::TensorOptions
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(1215): error: no instance of constructor "c10::optional::optional [with T=PyObject *]" matches the argument list
argument types are: (PyObject *)
detected during instantiation of "c10::optional<std::decay::type> c10::make_optional(T &&) [with T=PyObject *]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorImpl.h(1671): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(684): error: class "std::enable_if<, c10::optionalc10::Device &>" has no member "type"
detected during instantiation of "c10::optional::operator= [with T=c10::Device]" based on template argument c10::Device
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorImpl.h(1853): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/DeprecatedTypeProperties.h(99): error: no instance of overloaded function "c10::TensorOptions::dtype" matches the argument list
argument types are: (caffe2::TypeMeta)
object type is: c10::TensorOptions
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/DeviceGuard.h(31): error: no instance of constructor "c10::impl::InlineDeviceGuard::InlineDeviceGuard [with T=c10::impl::VirtualGuardImpl]" matches the argument list
argument types are: (c10::Device, const c10::impl::DeviceGuardImplInterface *)
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/DeviceGuard.h(50): error: more than one instance of overloaded function "c10::impl::InlineDeviceGuard::reset_device [with T=c10::impl::VirtualGuardImpl]" matches the argument list:
function template "std::enable_if<, void>::type c10::impl::InlineDeviceGuard::reset_device(c10::Device) [with T=c10::impl::VirtualGuardImpl]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/impl/InlineDeviceGuard.h(136): here
function template "std::enable_if<std::is_same<U, c10::impl::VirtualGuardImpl>::value, void>::type c10::impl::InlineDeviceGuard::reset_device(c10::Device, const c10::impl::DeviceGuardImplInterface *) [with T=c10::impl::VirtualGuardImpl]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/impl/InlineDeviceGuard.h(159): here
argument types are: (c10::Device)
object type is: c10::impl::InlineDeviceGuardc10::impl::VirtualGuardImpl
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/impl/InlineDeviceGuard.h(158): error: class "std::enable_if<, void>" has no member "type"
detected during instantiation of "c10::impl::InlineDeviceGuard::reset_device [with T=c10::impl::VirtualGuardImpl]" based on template argument c10::impl::VirtualGuardImpl
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/DeviceGuard.h(57): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/DeviceGuard.h(156): error: no instance of overloaded function "c10::impl::InlineOptionalDeviceGuard::reset_device [with T=c10::impl::VirtualGuardImpl]" matches the argument list
argument types are: (c10::Device)
object type is: c10::impl::InlineOptionalDeviceGuardc10::impl::VirtualGuardImpl
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/DeviceGuard.h(163): error: no instance of overloaded function "c10::impl::InlineOptionalDeviceGuard::reset_device [with T=c10::impl::VirtualGuardImpl]" matches the argument list
argument types are: (c10::Device, const c10::impl::DeviceGuardImplInterface *)
object type is: c10::impl::InlineOptionalDeviceGuardc10::impl::VirtualGuardImpl
/usr/include/c++/11/type_traits(2579): error: class "std::enable_if<, c10::complex>" has no member "type"
detected during:
instantiation of type "std::enable_if_t<, c10::complex>"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/complex.h(176): here
instantiation of "c10::complex::complex [with T=float]" based on template argument
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/TypeCast.h(77): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/TypeCast.h(77): error: more than one instance of constructor "c10::complex::complex [with T=float]" matches the argument list:
function template "c10::complex::complex(const std::enable_if_t<std::is_same<U, float>::value, c10::complex> &) [with T=float]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/complex.h(170): here
function template "c10::complex::complex(const std::enable_if_t<std::is_same<U, double>::value, c10::complex> &) [with T=float]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/complex.h(175): here
argument types are: (c10::BFloat16)
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/TypeCast.h(86): error: more than one instance of constructor "c10::complex::complex [with T=float]" matches the argument list:
function template "c10::complex::complex(const std::enable_if_t<std::is_same<U, float>::value, c10::complex> &) [with T=float]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/complex.h(170): here
function template "c10::complex::complex(const std::enable_if_t<std::is_same<U, double>::value, c10::complex> &) [with T=float]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/complex.h(175): here
argument types are: (c10::Half)
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/TypeCast.h(98): error: more than one user-defined conversion from "c10::complex" to "c10::complex" applies:
function template "c10::complex::complex(const std::enable_if_t<std::is_same<U, float>::value, c10::complex> &) [with T=float]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/complex.h(170): here
function template "c10::complex::complex(const std::enable_if_t<std::is_same<U, double>::value, c10::complex> &) [with T=float]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/complex.h(175): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h(39): error: no instance of constructor "c10::Scalar::Scalar" matches the argument list
argument types are: (uint8_t, __nv_bool)
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h(39): error: no instance of constructor "c10::Scalar::Scalar" matches the argument list
argument types are: (int8_t, __nv_bool)
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h(39): error: no instance of constructor "c10::Scalar::Scalar" matches the argument list
argument types are: (int16_t, __nv_bool)
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h(39): error: no instance of constructor "c10::Scalar::Scalar" matches the argument list
argument types are: (int, __nv_bool)
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h(39): error: no instance of constructor "c10::Scalar::Scalar" matches the argument list
argument types are: (int64_t, __nv_bool)
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::complex, _Up=__nv_bool]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h(40): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::complex, _Up=__nv_bool]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/Scalar.h(40): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::ArrayRef<int64_t>, _Up=c10::nullopt_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(567): here
instantiation of class "c10::optional [with T=c10::ArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/OptionalArrayRef.h(208): here
instantiation of class "c10::OptionalArrayRef [with T=int64_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/OptionalArrayRef.h(216): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::ArrayRef<int64_t>, _Up=c10::nullopt_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(567): here
instantiation of class "c10::optional [with T=c10::ArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/OptionalArrayRef.h(208): here
instantiation of class "c10::OptionalArrayRef [with T=int64_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/OptionalArrayRef.h(216): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::ArrayRef<int64_t>, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(570): here
instantiation of class "c10::optional [with T=c10::ArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/OptionalArrayRef.h(208): here
instantiation of class "c10::OptionalArrayRef [with T=int64_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/OptionalArrayRef.h(216): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::ArrayRef<int64_t>, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(570): here
instantiation of class "c10::optional [with T=c10::ArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/OptionalArrayRef.h(208): here
instantiation of class "c10::OptionalArrayRef [with T=int64_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/OptionalArrayRef.h(216): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::ArrayRef<int64_t>, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/OptionalArrayRef.h(219): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::ArrayRef<int64_t>, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/OptionalArrayRef.h(219): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optional<__nv_bool>, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/CheckMemoryFormat.h(9): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optional<__nv_bool>, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/CheckMemoryFormat.h(9): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::NameType, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/Dimname.h(20): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::NameType, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/Dimname.h(20): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::NameType, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/Dimname.h(20): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::NameType, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/Dimname.h(20): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::Symbol, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/Dimname.h(41): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::Symbol, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/Dimname.h(41): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::Symbol, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/Dimname.h(41): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::Symbol, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/Dimname.h(41): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::Dimname, _Up=at::Dimname]"
/usr/include/c++/11/bits/stl_vector.h(401): here
instantiation of class "std::vector<_Tp, _Alloc> [with _Tp=at::Dimname, _Alloc=std::allocatorat::Dimname]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/NamedTensor.h(69): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::Dimname, _Up=at::Dimname]"
/usr/include/c++/11/bits/stl_vector.h(401): here
instantiation of class "std::vector<_Tp, _Alloc> [with _Tp=at::Dimname, _Alloc=std::allocatorat::Dimname]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/NamedTensor.h(69): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::Dimname *, _Up=at::Dimname *]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/NamedTensor.h(44): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::Dimname *, _Up=at::Dimname *]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/NamedTensor.h(44): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::intrusive_ptr<c10::TensorImpl, c10::UndefinedTensorImpl>, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(209): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::intrusive_ptr<c10::TensorImpl, c10::UndefinedTensorImpl>, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(209): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::intrusive_ptr<c10::TensorImpl, c10::UndefinedTensorImpl>, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(209): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::intrusive_ptr<c10::TensorImpl, c10::UndefinedTensorImpl>, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(209): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::DimnameList, _Up=c10::nullopt_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(567): here
instantiation of class "c10::optional [with T=at::DimnameList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(230): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::DimnameList, _Up=c10::nullopt_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(567): here
instantiation of class "c10::optional [with T=at::DimnameList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(230): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::DimnameList, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(570): here
instantiation of class "c10::optional [with T=at::DimnameList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(230): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::DimnameList, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(570): here
instantiation of class "c10::optional [with T=at::DimnameList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(230): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optionalat::DimnameList, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(231): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optionalat::DimnameList, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(231): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optionalat::DimnameList, _Up=c10::optionalat::DimnameList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(231): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::optionalat::DimnameList, _Up=c10::optionalat::DimnameList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(231): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=const at::Dimname *, _Up=at::Dimname *]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(235): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=const at::Dimname *, _Up=at::Dimname *]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(235): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::Layout, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(253): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::Layout, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(253): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::vector<int64_t, std::allocator<int64_t>>, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(256): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::vector<int64_t, std::allocator<int64_t>>, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(256): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::vector<int64_t, std::allocator<int64_t>>, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(256): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::vector<int64_t, std::allocator<int64_t>>, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(256): here
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(508): error: no instance of overloaded function "c10::TensorOptions::dtype" matches the argument list
argument types are: (caffe2::TypeMeta)
object type is: c10::TensorOptions
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::atomic, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(916): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::atomic, _Up=c10::OptionalArrayRef<int64_t>]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(916): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::atomic, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(916): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=std::atomic, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(916): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::TensorBase, _Up=c10::nullopt_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(567): here
instantiation of class "c10::optional [with T=at::TensorBase]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(951): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::TensorBase, _Up=c10::nullopt_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(567): here
instantiation of class "c10::optional [with T=at::TensorBase]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(951): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::TensorBase, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(570): here
instantiation of class "c10::optional [with T=at::TensorBase]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(951): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::TensorBase, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(570): here
instantiation of class "c10::optional [with T=at::TensorBase]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBase.h(951): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::TensorList, _Up=c10::nullopt_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(567): here
instantiation of class "c10::optional [with T=at::TensorList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h(424): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::TensorList, _Up=c10::nullopt_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(567): here
instantiation of class "c10::optional [with T=at::TensorList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h(424): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::TensorList, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(570): here
instantiation of class "c10::optional [with T=at::TensorList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h(424): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::TensorList, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(570): here
instantiation of class "c10::optional [with T=at::TensorList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h(424): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::nullopt_t, _Up=c10::optionalat::TensorList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h(424): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during instantiation of class "std::is_same<_Tp, _Up> [with _Tp=c10::nullopt_t, _Up=c10::optionalat::TensorList]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h(424): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::Tensor, _Up=c10::nullopt_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(567): here
instantiation of class "c10::optional [with T=at::Tensor]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h(509): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::Tensor, _Up=c10::nullopt_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(567): here
instantiation of class "c10::optional [with T=at::Tensor]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h(509): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::Tensor, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(570): here
instantiation of class "c10::optional [with T=at::Tensor]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h(509): here
/usr/include/c++/11/type_traits(1406): error: type name is not allowed
detected during:
instantiation of class "std::is_same<_Tp, _Up> [with _Tp=at::Tensor, _Up=c10::in_place_t]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/Optional.h(570): here
instantiation of class "c10::optional [with T=at::Tensor]"
/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/TensorBody.h(509): here
Error limit reached.
100 errors detected in the compilation of "/home/dkx/myPythonProject/RayDN-main/detection/mmdet_custom/models/backbones/base/cuda_new/bi_wkv_kernel.cu".
Compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
subprocess.run(
File "/home/dkx/.conda/envs/py38/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/dkx/myPythonProject/RayDN-main/detection/mmdet_custom/models/backbones/base/vrwkv.py", line 99, in
wkv_cuda = load(name="bi_wkv", sources=["/home/dkx/myPythonProject/RayDN-main/detection/mmdet_custom/models/backbones/base/cuda_new/bi_wkv.cpp", "/home/dkx/myPythonProject/RayDN-main/detection/mmdet_custom/models/backbones/base/cuda_new/bi_wkv_kernel.cu"],
File "/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1202, in load
return _jit_compile(
File "/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1425, in _jit_compile
_write_ninja_file_and_build_library(
File "/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1537, in _write_ninja_file_and_build_library
_run_ninja_build(
File "/home/dkx/.conda/envs/py38/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1824, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'bi_wkv'
然后我在文件detection文件夹的的mmdet_custom/models/backbones/base/vrwkv.py内测试代码的流程是这样的:
if name == 'main':
# 配置一些参数
n_embd = 64 # 嵌入维度
n_layer = 4 # 层数
layer_id = 2 # 当前层的 ID,假设是第 2 层
shift_mode = 'q_shift' # 平移模式
channel_gamma = 1 / 4 # 通道混合比例
shift_pixel = 1 # 平移的像素
init_mode = 'fancy' # 权重初始化方式
key_norm = True # 是否进行归一化
# 实例化 VRWKV_SpatialMix 类
model = VRWKV_SpatialMix(
n_embd=n_embd,
n_layer=n_layer,
layer_id=layer_id,
shift_mode=shift_mode,
channel_gamma=channel_gamma,
shift_pixel=shift_pixel,
init_mode=init_mode,
key_norm=key_norm
)
# 创建一个输入张量
batch_size = 2
time_steps = 64
input_tensor = torch.randn(batch_size, time_steps, n_embd)#.cuda() # 输入形状为 [batch_size, time_steps, n_embd]
# 假设 patch_resolution 为 (8, 8),表示每个 patch 的分辨率
patch_resolution = (8, 8)
# 进行前向传播
output = model(input_tensor, patch_resolution)
# 打印输出的形状和内容以验证
print(f"Output shape: {output.shape}")
print(f"Output: {output}")
`,请问是什么问题导致的呢