现在只要计算次数超过1024*1024*100,以下代码会报错:[ERROR] Synchronize stream failed. error code is 0。不知是什么原因
收藏回复举报
现在只要计算次数超过1024*1024*100,以下代码会报错:[ERROR] Synchronize stream failed. error code is 0。不知是什么原因
t('forum.solved') 已解决
发表于2024-11-19 11:59:47
0 查看

现在只要计算次数超过1024*1024*100,以下代码会报错:[ERROR]  Synchronize stream failed. error code is 0。

for(int i=0;i<1024*1024*100;i++){         
            Add(tmp2,tmp1,tmp1,1);      
        }                                     
        Gm_y(1)=125;             
        /*报错:
            INFO: make success!
            INFO: execute op!
            [ERROR]  Synchronize stream failed. error code is 0
            [ERROR]  Run op failed
            [INFO]  Set device[0] success
            [INFO]  Get RunMode[0] success
            [INFO]  Init resource success
            [INFO]  Set input success
            [INFO]  Copy input[0] success
            [INFO]  Create stream success
            [INFO]  Execute aclnnLogSumExpGetWorkspaceSize success, workspace size 0
            [INFO]  Execute aclnnLogSumExp success
            [INFO]  Reset Device success
            [INFO]  Destory resource success
            ERROR: acl executable run failed! please check your project!

        */ 

        for(int i=0;i<1024*1024;i++){          
            Add(tmp2,tmp1,tmp1,1);     
        }                                      
        Gm_y(1)=125;  
        /* 没报错: 
            INFO: make success!
            INFO: execute op!
            [INFO]  Set device[0] success
            [INFO]  Get RunMode[0] success
            [INFO]  Init resource success
            [INFO]  Set input success
            [INFO]  Copy input[0] success
            [INFO]  Create stream success
            [INFO]  Execute aclnnLogSumExpGetWorkspaceSize success, workspace size 0
            [INFO]  Execute aclnnLogSumExp success
            [INFO]  Synchronize stream success
            [INFO]  Copy output[0] success
            [INFO]  Write output success
            [INFO]  Run op success
            [INFO]  Reset Device success
            [INFO]  Destory resource success
            INFO: acl executable run success!
        */

本帖最后由 匿名用户2024/11/19 16:50:26 编辑

我要发帖子