From 33e3f5ac5b8eb394138b5f3441f68fe12a83a6ef Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Thu, 27 Jan 2022 19:41:48 +0800 Subject: [PATCH] Add kernelsignature constructor for windows (#39253) * add constructor for win * change impl * fix bug --- paddle/pten/core/compat/arg_map_context.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/paddle/pten/core/compat/arg_map_context.h b/paddle/pten/core/compat/arg_map_context.h index e7dfc070654..835799ec546 100644 --- a/paddle/pten/core/compat/arg_map_context.h +++ b/paddle/pten/core/compat/arg_map_context.h @@ -34,6 +34,7 @@ struct KernelSignature { KernelArgsTuple args; KernelSignature() = default; + KernelSignature(std::string&& kernel_name, paddle::SmallVector&& inputs, paddle::SmallVector&& attrs, @@ -45,6 +46,14 @@ struct KernelSignature { const paddle::SmallVector& attrs, const paddle::SmallVector& outputs) : name(kernel_name), args(std::make_tuple(inputs, attrs, outputs)) {} + + // TODO(chenweihang): add assign constructor to solve windows compile + // problem, remove it later + KernelSignature& operator=(const KernelSignature& other) { + name = other.name; + args = other.args; + return *this; + } }; std::ostream& operator<<(std::ostream& os, KernelSignature signature); -- GitLab