From b259b1ecbb191fe218d4465309a0dfad269f5123 Mon Sep 17 00:00:00 2001 From: YuanRisheng Date: Tue, 16 Nov 2021 12:14:45 +0000 Subject: [PATCH] add PD_DLL_DECL for elementwise_sub --- paddle/pten/api/include/math.h | 2 +- paddle/pten/api/lib/math.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/pten/api/include/math.h b/paddle/pten/api/include/math.h index cb462ea5ac03d..a49d6c116abc5 100644 --- a/paddle/pten/api/include/math.h +++ b/paddle/pten/api/include/math.h @@ -25,6 +25,6 @@ PD_DLL_DECL Tensor mean(const Tensor& x); PD_DLL_DECL Tensor add(const Tensor& x, const Tensor& y); -Tensor subtract(const Tensor& x, const Tensor& y); +PD_DLL_DECL Tensor subtract(const Tensor& x, const Tensor& y); } // namespace experimental } // namespace paddle diff --git a/paddle/pten/api/lib/math.cc b/paddle/pten/api/lib/math.cc index 543a2eea2afdd..b86391a3e44df 100644 --- a/paddle/pten/api/lib/math.cc +++ b/paddle/pten/api/lib/math.cc @@ -96,7 +96,7 @@ PD_DLL_DECL Tensor add(const Tensor& x, const Tensor& y) { return out; } -Tensor subtract(const Tensor& x, const Tensor& y) { +PD_DLL_DECL Tensor subtract(const Tensor& x, const Tensor& y) { // 1. Get kernel signature and kernel auto kernel_key_set = ParseKernelKeyByInputArgs(x); auto kernel_key = kernel_key_set.GetHigestPriorityKernelKey();