From 4eec94dda1ad802b8fe26079e1427c36fda4daa4 Mon Sep 17 00:00:00 2001 From: Allen Guo Date: Fri, 12 Aug 2022 18:07:58 +0800 Subject: [PATCH] fix compilation (#45087) --- paddle/fluid/platform/device/ipu/ipu_compiler.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/paddle/fluid/platform/device/ipu/ipu_compiler.cc b/paddle/fluid/platform/device/ipu/ipu_compiler.cc index 22b8b67fa64..7eaf25f5dfd 100644 --- a/paddle/fluid/platform/device/ipu/ipu_compiler.cc +++ b/paddle/fluid/platform/device/ipu/ipu_compiler.cc @@ -80,6 +80,16 @@ struct CustomOpAttrVisitor { "Unsupported calling method for `paddle::blank` type when extracting " "custom operator attributes.")); } + void operator()(framework::VarDesc*) const { + PADDLE_THROW(platform::errors::Unavailable( + "Unsupported calling method for `VarDesc*` type when extracting " + "custom operator attributes.")); + } + void operator()(const std::vector&) const { + PADDLE_THROW(platform::errors::Unavailable( + "Unsupported calling method for `std::vector` " + "type when extracting custom operator attributes.")); + } }; struct ConstantOpAttrVisitor { @@ -131,6 +141,10 @@ struct ConstantOpAttrVisitor { void operator()(const std::vector& v) const { RAISE_ERROR; } void operator()(int64_t v) const { RAISE_ERROR; } void operator()(paddle::blank) const { RAISE_ERROR; } + void operator()(framework::VarDesc*) const { RAISE_ERROR; } + void operator()(const std::vector&) const { + RAISE_ERROR; + } #undef RAISE_ERROR }; -- GitLab