省流版:
本来懒得氵了,结果搜了下没啥结果,看了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,所以报这个错