Update cmake for arm ft and fix a bug for Predictor dtor. (#28586)

musl/fix_failed_unittests_in_musl
Wilber 4 years ago committed by GitHub
parent f962bd3432
commit 8b97bb2e1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -175,9 +175,15 @@ bool AnalysisPredictor::PrepareScope(
status_is_cloned_ = true;
} else {
paddle::framework::InitDevices(false);
scope_.reset(new paddle::framework::Scope(), [&](framework::Scope *scope) {
scope_.reset(new paddle::framework::Scope(), [](framework::Scope *scope) {
delete scope;
memory::Release(place_);
#ifdef PADDLE_WITH_CUDA
for (int dev_id = 0; dev_id < paddle::platform::GetCUDADeviceCount();
++dev_id) {
memory::Release(platform::CUDAPlace(dev_id));
}
#endif
memory::Release(platform::CPUPlace());
});
status_is_cloned_ = false;
}

@ -106,7 +106,7 @@ if(APPLE)
message(FATAL_ERROR "install_name_tool not found, please check.\n")
endif()
endif()
if(LINUX AND NOT WITH_SW)
if(LINUX AND NOT WITH_SW AND NOT WITH_ARM)
find_program(PATCHELF_EXECUTABLE patchelf)
if(NOT PATCHELF_EXECUTABLE)
message(FATAL_ERROR "patchelf not found, please install it.\n"

Loading…
Cancel
Save