Commit 7e9699ce authored by Paul's avatar Paul
Browse files

Check error code for find

parent 82af58fe
...@@ -64,7 +64,7 @@ shape miopen_convolution::compile(context& ctx, ...@@ -64,7 +64,7 @@ shape miopen_convolution::compile(context& ctx,
int algo_count = 1; int algo_count = 1;
miopenConvAlgoPerf_t perf; miopenConvAlgoPerf_t perf;
miopenFindConvolutionForwardAlgorithm(ctx.get_stream().get_miopen(), auto status = miopenFindConvolutionForwardAlgorithm(ctx.get_stream().get_miopen(),
x_desc.get(), x_desc.get(),
x.implicit(), x.implicit(),
w_desc.get(), w_desc.get(),
...@@ -78,6 +78,8 @@ shape miopen_convolution::compile(context& ctx, ...@@ -78,6 +78,8 @@ shape miopen_convolution::compile(context& ctx,
workspace.implicit(), workspace.implicit(),
workspace_size, workspace_size,
false); false);
if (status != miopenStatusSuccess)
MIGRAPHX_THROW("Find convolution failed");
algo = perf.fwd_algo; algo = perf.fwd_algo;
return shape{shape::int8_type, {perf.memory}}; return shape{shape::int8_type, {perf.memory}};
} }
......
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