From 8250a47bc1125b7db856a1d9d9c00f07e04200ec Mon Sep 17 00:00:00 2001 From: Attila Dusnoki Date: Mon, 28 Aug 2023 15:13:46 +0000 Subject: [PATCH] Add throw for GPU non-default dilations --- src/targets/gpu/include/migraphx/gpu/miopen.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/targets/gpu/include/migraphx/gpu/miopen.hpp b/src/targets/gpu/include/migraphx/gpu/miopen.hpp index 6d03e69b6e6..cd3864741c4 100644 --- a/src/targets/gpu/include/migraphx/gpu/miopen.hpp +++ b/src/targets/gpu/include/migraphx/gpu/miopen.hpp @@ -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(&miopenCreatePoolingDescriptor); int kdims = op.kdims();