"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "d44f666016c4cce6283cd7a8f94e0475d9675368"
Commit afebb964 authored by wangshaojie6's avatar wangshaojie6
Browse files

add workspace size check

parent e8d6434d
...@@ -324,6 +324,12 @@ int main(int argc, char* argv[]) ...@@ -324,6 +324,12 @@ int main(int argc, char* argv[])
// alloc work space // alloc work space
size_t bwd_weight_workspace_size = conv->GetWorkSpaceSize(argument.get()); size_t bwd_weight_workspace_size = conv->GetWorkSpaceSize(argument.get());
if(bwd_weight_workspace_size <= 0)
{
print_use_msg();
exit(1);
}
float conv_ave_time = 0.f; float conv_ave_time = 0.f;
DeviceMem wei_work_space_device_buf(bwd_weight_workspace_size); DeviceMem wei_work_space_device_buf(bwd_weight_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