"git@developer.sourcefind.cn:tsoc/superbenchmark.git" did not exist on "1652524aa091d3c86cbd599e8204185012231e55"
Commit 711fecf4 authored by xgqdut2016's avatar xgqdut2016
Browse files

issue/342: modified workspace

parent d741ee7d
...@@ -570,8 +570,8 @@ infiniStatus_t Descriptor::create( ...@@ -570,8 +570,8 @@ infiniStatus_t Descriptor::create(
int cluster_num = 8; int cluster_num = 8;
int core_num = 64; int core_num = 64;
int n = probs_desc->numel(); int n = probs_desc->numel();
int topk = 50;//必须想办法控制workspace大小,如果topk太大会导致无法申请进而结果报错
size_t workspace_size = (n + cluster_num * core_num * topk) * (infiniSizeOf(probs_desc->dtype()) + infiniSizeOf(result_desc->dtype())) + cluster_num * sizeof(float); size_t workspace_size = (n + cluster_num * core_num * n) * (infiniSizeOf(probs_desc->dtype()) + infiniSizeOf(result_desc->dtype())) + cluster_num * sizeof(float);
*desc_ptr = new Descriptor( *desc_ptr = new Descriptor(
info, info,
workspace_size, workspace_size,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment