Skip to content

Commit 4743cc8

Browse files
authored
[Release2.4] Revert python link prs (#48573)
* Revert "Fix mac link python (#48017)" This reverts commit 3fa7a73. * Revert "[Cherry-pick] Fix python link error (#47811)" This reverts commit ff642c6. * Update config.go
1 parent 3fa7a73 commit 4743cc8

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

paddle/fluid/inference/goapi/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ func (config *Config) IrOptim() bool {
332332
/// \param useCalibMode Use TRT int8 calibration(post training
333333
/// quantization).
334334
///
335-
func (config *Config) EnableTensorRtEngine(workspaceSize int32, maxBatchSize int32, minSubgraphSize int32,
335+
func (config *Config) EnableTensorRtEngine(workspaceSize int64, maxBatchSize int32, minSubgraphSize int32,
336336
precision Precision, useStatic bool, useCalibMode bool) {
337-
C.PD_ConfigEnableTensorRtEngine(config.c, C.int32_t(workspaceSize), C.int32_t(maxBatchSize), C.int32_t(minSubgraphSize), C.int32_t(precision), cvtGoBoolToPD(useStatic), cvtGoBoolToPD(useCalibMode))
337+
C.PD_ConfigEnableTensorRtEngine(config.c, C.int64_t(workspaceSize), C.int32_t(maxBatchSize), C.int32_t(minSubgraphSize), C.int32_t(precision), cvtGoBoolToPD(useStatic), cvtGoBoolToPD(useCalibMode))
338338
}
339339

340340
///

paddle/fluid/pybind/CMakeLists.txt

-13
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,6 @@ if(WITH_PYTHON)
262262
list(APPEND OP_FUNCTION_GENERETOR_DEPS cncl_context)
263263
endif()
264264

265-
if(NOT ((NOT WITH_PYTHON) AND ON_INFER))
266-
list(APPEND OP_FUNCTION_GENERETOR_DEPS ${PYTHON_LIBRARIES})
267-
endif()
268-
269265
add_executable(op_function_generator op_function_generator.cc)
270266
target_link_libraries(op_function_generator ${OP_FUNCTION_GENERETOR_DEPS})
271267
add_executable(eager_legacy_op_function_generator
@@ -605,13 +601,4 @@ if(WITH_PYTHON)
605601
get_property(os_dependency_modules GLOBAL PROPERTY OS_DEPENDENCY_MODULES)
606602
target_link_libraries(${SHARD_LIB_NAME} ${os_dependency_modules})
607603
add_dependencies(${SHARD_LIB_NAME} op_function_generator_cmd)
608-
609-
if(APPLE)
610-
string(REGEX REPLACE ".+/(.+)" "\\1" PYTHON_LIBRARY_NAME
611-
${PYTHON_LIBRARIES})
612-
# target_link_libraries(${SHARD_LIB_NAME} "-Wl,-rpath,${PYTHON_LIBRARY_NAME}")
613-
else()
614-
target_link_libraries(${SHARD_LIB_NAME} ${PYTHON_LIBRARIES})
615-
endif()
616-
617604
endif()

0 commit comments

Comments
 (0)