Skip to content

Commit

Permalink
Add throw for GPU non-default dilations
Browse files Browse the repository at this point in the history
  • Loading branch information
attila-dusnoki-htec committed Aug 28, 2023
1 parent bd64df7 commit 8250a47
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/targets/gpu/include/migraphx/gpu/miopen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ inline pooling_descriptor make_pooling(const migraphx::op::pooling& op)
ss << op.mode;
MIGRAPHX_THROW(ss.str());
}
if(not std::all_of(op.dilations.cbegin(), op.dilations.cend(), [](std::size_t d){ return d == 1; }))
{
std::stringstream ss("Unsupported dilations for pooling: [");
for(const auto& d : op.dilations) ss << d << ",";
ss << "]";
MIGRAPHX_THROW(ss.str());
}
auto p = make_obj<pooling_descriptor>(&miopenCreatePoolingDescriptor);

int kdims = op.kdims();
Expand Down

0 comments on commit 8250a47

Please sign in to comment.