Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmake/phi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ function(generate_unify_header DIR_NAME)
endif()
endif()
endforeach()
if(DEFINED REDUCE_INFERENCE_LIB_SIZE)
if(${kernel_name} MATCHES ".*_grad")
continue()
endif()
endif()
# append header into extension.h
string(REPLACE "${PADDLE_SOURCE_DIR}\/" "" header_file "${header_file}")
file(APPEND ${phi_extension_header_file} "#include \"${header_file}\"\n")
Expand Down Expand Up @@ -167,6 +162,11 @@ function(kernel_declare TARGET_LIST)
endwhile()
# append kernel declare into declarations.h
if(NOT kernel_declare_id STREQUAL "")
if(DEFINED REDUCE_INFERENCE_LIB_SIZE)
if(${kernel_declare_id} MATCHES ".*_grad,.*")
continue()
endif()
endif()
file(APPEND ${kernel_declare_file} "${kernel_declare_id}\n")
endif()
endforeach()
Expand Down
10 changes: 0 additions & 10 deletions paddle/phi/kernels/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ if(NOT WITH_DGC)
list(REMOVE_ITEM kernel_gpu "gpu/dgc_kernel.cu")
endif()

if(DEFINED REDUCE_INFERENCE_LIB_SIZE)
list(FILTER kernel_cu EXCLUDE REGEX ".*_grad_kernel\\.cu$")
list(FILTER kernel_gpu EXCLUDE REGEX ".*_grad_kernel\\.cc$")
list(FILTER kernel_gpu EXCLUDE REGEX ".*_grad_kernel\\.cu$")
endif()

if(WITH_CUTLASS)
add_custom_target(
gemm_epilogue_compile_script ALL
Expand Down Expand Up @@ -276,10 +270,6 @@ file(
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
${cc_search_pattern})

if(DEFINED REDUCE_INFERENCE_LIB_SIZE)
list(FILTER kernel_cc EXCLUDE REGEX ".*_grad_kernel\\.cc$")
endif()

if(NOT
(WITH_AVX
AND AVX512F_FOUND
Expand Down