Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
711fecf4
Commit
711fecf4
authored
Sep 02, 2025
by
xgqdut2016
Browse files
issue/342: modified workspace
parent
d741ee7d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/infiniop/ops/random_sample/kunlun/random_sample_kunlun.xpu
...nfiniop/ops/random_sample/kunlun/random_sample_kunlun.xpu
+2
-2
No files found.
src/infiniop/ops/random_sample/kunlun/random_sample_kunlun.xpu
View file @
711fecf4
...
...
@@ -570,8 +570,8 @@ infiniStatus_t Descriptor::create(
int cluster_num = 8;
int core_num = 64;
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(
info,
workspace_size,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment