省流版:
本来懒得氵了,结果搜了下没啥结果,看了CUDA文档才知道,CUDA10还没有这个枚举值, CUDA11以及以上的版本才有
带着 CINN 编译 Paddle 报错:
cmake .. -DWITH_GPU=ON -DWITH_TESTING=ON -DCINN_ONLY=OFF -DWITH_CINN=ON
/Paddle/paddle/cinn/common/target.cc:84:36: error: ‘cudaDevAttrMaxBlocksPerMultiprocessor’ is not a member of ‘cudaDeviceAttr’
&max_blocks, cudaDeviceAttr::cudaDevAttrMaxBlocksPerMultiprocessor, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Paddle/paddle/cinn/common/target.cc: In function ‘int cinn::common::GetMaxBlocks()’:
/Paddle/paddle/cinn/common/target.cc:217:36: error: ‘cudaDevAttrMaxBlocksPerMultiprocessor’ is not a member of ‘cudaDeviceAttr’
&max_blocks, cudaDeviceAttr::cudaDevAttrMaxBlocksPerMultiprocessor, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CMakeFiles/cinncore_static.dir/build.make:588: recipe for target 'CMakeFiles/cinncore_static.dir/paddle/cinn/common/target.cc.o' failed
看了下CUDA11, 12的文档,cudaDeviceAttr
都有这个 cudaDevAttrMaxBlocksPerMultiprocessor
的 value.
但是CUDA10没有这个枚举值,而我当前环境都是CUDA10.2,所以报这个错文章来源:https://www.toymoban.com/news/detail-737507.html
还要迁移CUDA环境,好烦🤣🤣🤣🤣文章来源地址https://www.toymoban.com/news/detail-737507.html
到了这里,关于[每日一氵] cudaDevAttrMaxBlocksPerMultiprocessor is not a member of cudaDeviceAttr的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!