Unverified Commit 2e624a8e authored by PanZezhong1725's avatar PanZezhong1725 Committed by GitHub
Browse files

Merge pull request #224 from InfiniTensor/issue/191/fix

issue/191/fix 修正random sample workspace返回result处理方式
parents df1c6b5d 4a180009
...@@ -26,10 +26,12 @@ infiniStatus_t Descriptor::create( ...@@ -26,10 +26,12 @@ infiniStatus_t Descriptor::create(
auto info = result.take(); auto info = result.take();
size_t workspace_size; size_t workspace_size;
#define CASE_P(CASE, Tidx, Tval) \ #define CASE_P(CASE, Tidx, Tval) \
case CASE: \ case CASE: { \
workspace_size = calculateWorkspace<Tidx, Tval>(info.n); \ auto workspace_result = calculateWorkspace<Tidx, Tval>(info.n); \
break CHECK_RESULT(workspace_result); \
workspace_size = workspace_result.take(); \
} break
#define CASE_I(CASE, Tidx) \ #define CASE_I(CASE, Tidx) \
case CASE: \ case CASE: \
......
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