NVCC cannot compile StaticAttributes.hpp
Problem description
This is not at all an urgent issue.
It will be if we need to implement a cuda kernal from scratch of an operator with static attributes.
It seems that nvcc cannot compile the file StaticAttributes.hpp and I got this log:
/builds/hrouis/aidge_backend_cuda/install_cpp/include/aidge/utils/StaticAttributes.hpp(155): error: no suitable constructor exists to convert from "const char *" to "std::type_info"
return typeid(typename std::tuple_element<SIZE-1,std::tuple<T...>>::type);
^
detected during:
instantiation of "std::enable_if<<expression>, const std::type_info &>::type Aidge::StaticAttributes<ATTRS_ENUM, T...>::getAttrType(std::size_t) const [with ATTRS_ENUM=Aidge::FCAttr, T=<Aidge::DimSize_t, __nv_bool>, SIZE=2UL]" at line 189
instantiation of "std::string Aidge::StaticAttributes<ATTRS_ENUM, T...>::getAttrType(const std::string &) const [with ATTRS_ENUM=Aidge::FCAttr, T=<Aidge::DimSize_t, __nv_bool>]"
/builds/hrouis/aidge_backend_cuda/install_cpp/include/aidge/utils/StaticAttributes.hpp(189): error: no suitable user-defined conversion from "const std::type_info" to "std::string" exists
return getAttrType(i).name();
^
detected during instantiation of "std::string Aidge::StaticAttributes<ATTRS_ENUM, T...>::getAttrType(const std::string &) const [with ATTRS_ENUM=Aidge::FCAttr, T=<Aidge::DimSize_t, __nv_bool>]"
/builds/hrouis/aidge_backend_cuda/install_cpp/include/aidge/utils/StaticAttributes.hpp(189): error: expected a ";"
return getAttrType(i).name();
^
detected during instantiation of "std::string Aidge::StaticAttributes<ATTRS_ENUM, T...>::getAttrType(const std::string &) const [with ATTRS_ENUM=Aidge::FCAttr, T=<Aidge::DimSize_t, __nv_bool>]"
/builds/hrouis/aidge_backend_cuda/install_cpp/include/aidge/utils/StaticAttributes.hpp(189): error: expected a "}"
return getAttrType(i).name();
^
/builds/hrouis/aidge_backend_cuda/install_cpp/include/aidge/utils/StaticAttributes.hpp(188): note #3196-D: to match this "{"
if (name == EnumStrings<ATTRS_ENUM>::data[i]) {
^
detected during instantiation of "std::string Aidge::StaticAttributes<ATTRS_ENUM, T...>::getAttrType(const std::string &) const [with ATTRS_ENUM=Aidge::FCAttr, T=<Aidge::DimSize_t, __nv_bool>]"
/builds/hrouis/aidge_backend_cuda/install_cpp/include/aidge/utils/StaticAttributes.hpp(189): error: expected a "}"
return getAttrType(i).name();
^
/builds/hrouis/aidge_backend_cuda/install_cpp/include/aidge/utils/StaticAttributes.hpp(187): note #3196-D: to match this "{"
for (std::size_t i = 0; i < size(EnumStrings<ATTRS_ENUM>::data); ++i) {
^
detected during instantiation of "std::string Aidge::StaticAttributes<ATTRS_ENUM, T...>::getAttrType(const std::string &) const [with ATTRS_ENUM=Aidge::FCAttr, T=<Aidge::DimSize_t, __nv_bool>]"
/builds/hrouis/aidge_backend_cuda/install_cpp/include/aidge/utils/StaticAttributes.hpp(189): error: expected a "}"
return getAttrType(i).name();
^
/builds/hrouis/aidge_backend_cuda/install_cpp/include/aidge/utils/StaticAttributes.hpp(186): note #3196-D: to match this "{"
std::string getAttrType(const std::string& name) const override final {
^
detected during instantiation of "std::string Aidge::StaticAttributes<ATTRS_ENUM, T...>::getAttrType(const std::string &) const [with ATTRS_ENUM=Aidge::FCAttr, T=<Aidge::DimSize_t, __nv_bool>]"
6 errors detected in the compilation of "/builds/hrouis/aidge_backend_cuda/src/operator/FCImpl_CUDA_kernels.cu".
make[2]: *** [CMakeFiles/_aidge_backend_cuda.dir/build.make:132: CMakeFiles/_aidge_backend_cuda.dir/src/operator/FCImpl_CUDA_kernels.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Edited by Cyril Moineau