Commit 3da18f30 authored by Khalique's avatar Khalique
Browse files

change condition for autopad to fail

parent 8f9a766f
......@@ -313,7 +313,11 @@ struct onnx_parser
{
if(contains(attributes, "auto_pad"))
{
MIGRAPHX_THROW("auto_pad and padding cannot be specified simultaneously");
auto s = attributes["auto_pad"].s();
if(contains(attributes, "pads") and to_upper(s) != "NOTSET")
{
MIGRAPHX_THROW("auto_pad and padding cannot be specified simultaneously");
}
}
std::vector<std::int64_t> padding;
copy(attributes["pads"].ints(), std::back_inserter(padding));
......
......@@ -7,6 +7,11 @@
#include <migraphx/onnx.hpp>
#include "test.hpp"
TEST_CASE(conv_autopad_fail_test)
{
EXPECT(test::throws([&] { migraphx::parse_onnx("conv_autopad_fail_test.onnx"); }));
}
TEST_CASE(pytorch_conv_bias_test)
{
migraphx::program p;
......
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