From 5746e5280db61058cd673785ae3de1d76f558b49 Mon Sep 17 00:00:00 2001 From: WangZhen <23097963+0x45f@users.noreply.github.com> Date: Thu, 23 Jun 2022 10:25:27 +0800 Subject: [PATCH] Fix layer_test ci error (#43758) --- paddle/fluid/jit/CMakeLists.txt | 12 +++++------- paddle/fluid/jit/layer_test.cc | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/paddle/fluid/jit/CMakeLists.txt b/paddle/fluid/jit/CMakeLists.txt index 40d2dd307fb..43f63945ae5 100644 --- a/paddle/fluid/jit/CMakeLists.txt +++ b/paddle/fluid/jit/CMakeLists.txt @@ -13,15 +13,13 @@ cc_library( SRCS base_function.cc DEPS scope proto_desc) -if(WITH_TESTING AND NOT WIN32) +if(WITH_TESTING + AND NOT WIN32 + AND NOT "$ENV{CI_SKIP_CPP_TEST}" STREQUAL "ON") add_custom_target( jit_download_program - COMMAND wget -nc --no-proxy - https://paddle-ci.gz.bcebos.com/dy2st/export.forward.pdiparams - COMMAND wget -nc --no-proxy - https://paddle-ci.gz.bcebos.com/dy2st/export.forward.pdmodel - COMMAND wget -nc --no-proxy - https://paddle-ci.gz.bcebos.com/dy2st/export.infer.pdmodel) + COMMAND wget -nc https://paddle-ci.gz.bcebos.com/dy2st/Testing.tar.gz + COMMAND tar zxvf Testing.tar.gz) set(JIT_DEPS phi elementwise_add_op diff --git a/paddle/fluid/jit/layer_test.cc b/paddle/fluid/jit/layer_test.cc index 6f8b7a58b84..dfd46818bde 100644 --- a/paddle/fluid/jit/layer_test.cc +++ b/paddle/fluid/jit/layer_test.cc @@ -76,7 +76,7 @@ TEST(CpuLayerTest, Construct) { paddle::imperative::SetCurrentTracer(tracer); imperative::GetCurrentTracer()->SetExpectedPlace(phi::CPUPlace()); - std::string path = "./"; + std::string path = "./Testing/"; auto layer = jit::Load(path); auto inputs = PrepareInputs(); @@ -105,7 +105,7 @@ TEST(GpuLayerTest, Construct) { const auto* dev_ctx_gpu = static_cast(&dev_ctx); DenseTensor cpu_dense_tensor; - std::string path = "./"; + std::string path = "./Testing/"; auto layer = jit::Load(path); auto inputs = PrepareInputs(); -- GitLab