cusparse ARC_MISMATCH问题

  • 1 replies
  • 76 views
cusparse ARC_MISMATCH问题
« 于: 十二月 01, 2019, 02:17:53 pm »
显卡RTX2080TI 安装了CUDA10.1 ,想用cusparse库解线性方程组,参考例程执行到cusparseScsrsv2_analysis时,返回值为4,对应


CUSPARSE_STATUS_ARCH_MISMATCH the device only supports compute capability 2.0
and above.

这个怎么解决呢,意思是我的显卡不兼容计算能力1.0以下所以不能用这个函数吗?

程序代码: [选择]
const cusparseOperation_t trans = CUSPARSE_OPERATION_NON_TRANSPOSE;
const cusparseSolvePolicy_t policy = CUSPARSE_SOLVE_POLICY_USE_LEVEL;
float alpha = 1.0;
status1 = cusparseCreate(&cuSphandle);

status2 = cusparseCreateCsrsv2Info(&csrsv2_info);

status3 = cusparseScsrsv2_bufferSize(cuSphandle, trans, rows, nnz, cuSpDescr,
(float*)ValDevPtr, RowPtrDevPtr, ColIdxDevPtr, csrsv2_info,&pBufferSize);

cudaMalloc((void**)&pBuffer, pBufferSize);

status4 = cusparseScsrsv2_analysis(cuSphandle, trans, rows, nnz, cuSpDescr,
(float*)ValDevPtr, RowPtrDevPtr, ColIdxDevPtr,
csrsv2_info, policy, pBuffer);

printf("buffer size:%d B\n", pBufferSize*4);
if (status1 || status2 || status3)
{
printf("cuSPARSE failed!\n");
}
cout <<  (int)status4 << endl;

return 0;





程序输出:
Csrsv2 satrt!
buffer size:148992 B
7

对于这个status,cusparse中有两个描述

4.22章节中对于cusparseStatus_t的描述
The function requires a feature absent from the device architecture
To correct: compile and run the application on a device with
appropriate compute capability

以及,10.2.9章节中Status Returned的描述
the device only supports compute capability 2.0 and above.
« 最后编辑时间: 十二月 01, 2019, 02:23:59 pm 作者 jetlin1992 »

Re: cusparse ARC_MISMATCH问题
« 回复 #1 于: 十二月 01, 2019, 02:37:57 pm »
看错了内容,回复的是7 CUSPARSE_STATUS_INTERNAL_ERROR