diff --git a/paddle/operators/math/CMakeLists.txt b/paddle/operators/math/CMakeLists.txt index 586347668efeea24526e3d8cd7b83cf3c8855e0d..d34bc92594dca06440d3ae9dc1ab351914e210d0 100644 --- a/paddle/operators/math/CMakeLists.txt +++ b/paddle/operators/math/CMakeLists.txt @@ -1,5 +1,13 @@ if (WITH_GPU) - nv_library(math_function SRCS math_function.cc math_function.cu DEPS cblas device_context) + if (WITH_MKLML) + nv_library(math_function SRCS math_function.cc math_function.cu DEPS mklml device_context) + else() + nv_library(math_function SRCS math_function.cc math_function.cu DEPS cblas device_context) + endif() else() - cc_library(math_function SRCS math_function.cc DEPS cblas device_context) + if (WITH_MKLML) + cc_library(math_function SRCS math_function.cc DEPS mklml device_context) + else() + cc_library(math_function SRCS math_function.cc DEPS cblas device_context) + endif() endif()