晋城做网站公司,百度竞价设不同网站,网络营销自学网站,网站广告推广哪家好项目场景#xff1a;
当使用高版本的cuda去安装低版本pytorch#xff0c;并且编译用低版本pytorch写的cuda算子时#xff0c;或者说是VS的版本过高如2022和2019#xff0c;都有可能会出现某个.h文件或者.c文件报错#xff0c;如#xff1a;
error: too few arguments f…项目场景
当使用高版本的cuda去安装低版本pytorch并且编译用低版本pytorch写的cuda算子时或者说是VS的版本过高如2022和2019都有可能会出现某个.h文件或者.c文件报错如
error: too few arguments for template template parameter Tuple detected during instantiation of class pybind11::detail::tuple_casterTuple, Ts... 解决方案
修改报错对应行的表达式像我这里报错的是torch里的cast.h的文件网络上关于这个cast.h的错误好像就是最多的就去conda envs里的
torch/include/pybind11/cast.h
在报错的前面加上下面的代码进行修改提前定义这个tuple_caster
template template typename... class Tuple, typename... Ts
class tuple_caster;template typename T1, typename T2 class type_casterstd::pairT1, T2: public tuple_casterstd::pair, T1, T2 {};template typename... Ts class type_casterstd::tupleTs...: public tuple_casterstd::tuple, Ts... {};