Skip to content
4 changes: 2 additions & 2 deletions paddle/phi/backends/dynload/mklml.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ limitations under the License. */
namespace phi {
namespace dynload {

extern std::once_flag mklml_dso_flag;
extern void *mklml_dso_handle;
TEST_API extern std::once_flag mklml_dso_flag;
TEST_API extern void *mklml_dso_handle;

/**
* The following macro definition can generate structs
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/backends/dynload/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void *dlsym(void *handle, const char *symbol_name);

void *dlopen(const char *filename, int flag);

int gettimeofday(struct timeval *tp, void *tzp);
TEST_API int gettimeofday(struct timeval *tp, void *tzp);
#endif // !_WIN32

void ExecShellCommand(const std::string &cmd, std::string *message);
Expand Down
6 changes: 3 additions & 3 deletions paddle/phi/kernels/funcs/math_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ void set_constant_with_place(const phi::DeviceContext& context,
phi::DenseTensor* tensor,
float value);

void set_constant(const phi::DeviceContext& context,
phi::DenseTensor* tensor,
float value);
TEST_API void set_constant(const phi::DeviceContext& context,
phi::DenseTensor* tensor,
float value);

template <typename DeviceContext, typename T>
struct RowwiseAdd {
Expand Down
5 changes: 1 addition & 4 deletions test/cpp/phi/kernels/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
cc_test(
test_math_function
SRCS test_math_function.cc
DEPS phi common)
paddle_test(test_math_function SRCS test_math_function.cc DEPS common)
if(WITH_GPU)
nv_test(
test_math_function_gpu
Expand Down