Skip to content

Failed to build test_benchmark in Release/2.6 (8189a99) #60092

@jeng1220

Description

@jeng1220

问题描述 Issue Description

Build release/2.6 branch but triggers following error if -DWITH_TESTING=ON:

[44/320] Linking CXX executable paddle/fluid/inference/utils/test_benchmark
FAILED: paddle/fluid/inference/utils/test_benchmark
: && /usr/local/bin/ccache /usr/bin/c++ -march=sandybridge -mtune=broadwell -Wno-error=range-loop-construct -Wno-error=maybe-uninitialized -Wno-error=switch -faligned-new=32 -Wno-error=uninitialized -Wno-error=deprecated-declarations -Wno-deprecated-declarations -std=c++17 -m64 -fPIC -fno-omit-frame-pointer -pipe -ffunction-sections -fdata-sections -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-error=array-bounds -Wno-error=ignored-attributes -Wno-error=int-in-bool-context -Wimplicit-fallthrough=0 -Wno-sign-compare -Wno-non-virtual-dtor -Wno-ignored-qualifiers -Wno-ignored-attributes -Wno-parentheses -msse3 -O3 -DNDEBUG  paddle/fluid/inference/utils/CMakeFiles/test_benchmark.dir/benchmark_tester.cc.o -o paddle/fluid/inference/utils/test_benchmark  -Wl,-rpath,/workspace/paddle/build/paddle/fluid/pybind:/workspace/paddle/build/paddle/phi:/workspace/paddle/build/paddle/common  third_party/install/glog/lib/libglog.a  paddle/fluid/pybind/libpaddle.so  paddle/fluid/inference/utils/libbenchmark.a  paddle/testing/libpaddle_gtest_main_new.a  paddle/phi/libphi.so  /usr/lib/x86_64-linux-gnu/libpython3.10.so  paddle/fluid/platform/libenforce.a  paddle/phi/libphi.so  paddle/common/libcommon.so  paddle/phi/api/profiler/libphi_profiler_proto.a  paddle/phi/core/distributed/auto_parallel/libauto_parallel_proto.a  paddle/utils/libpaddle_flags.a  libcblas.a  third_party/install/openblas/lib/libopenblas.a  third_party/install/utf8proc/lib/libutf8proc.a  third_party/install/gloo/lib/libgloo.a  third_party/install/dgc/lib/libdgc.a  paddle/phi/core/libexternal_error_proto.a  third_party/install/gtest/lib/libgtest.a  third_party/install/xxhash/lib/libxxhash.a  paddle/fluid/framework/libframework_proto.a  third_party/install/glog/lib/libglog.a  third_party/install/protobuf/lib/libprotobuf.a -pthread -ldl -lrt -lz -lssl -lcrypto -pthread -Wl,--no-as-needed -ldl -lrt -lz && :
/usr/bin/ld: paddle/testing/libpaddle_gtest_main_new.a(paddle_gtest_main.cc.o): in function `main':
paddle_gtest_main.cc:(.text.startup.main+0x31): undefined reference to `paddle::memory::allocation::UseAllocatorStrategyGFlag()'
/usr/bin/ld: paddle_gtest_main.cc:(.text.startup.main+0x5e1): undefined reference to `paddle_flags::FLAGS_enable_gpu_memory_usage_log'
/usr/bin/ld: paddle_gtest_main.cc:(.text.startup.main+0x623): undefined reference to `paddle::framework::InitMemoryMethod()'
/usr/bin/ld: paddle_gtest_main.cc:(.text.startup.main+0x628): undefined reference to `paddle::framework::InitDevices()'
/usr/bin/ld: paddle_gtest_main.cc:(.text.startup.main+0x62d): undefined reference to `paddle::framework::InitDefaultKernelSignatureMap()'

版本&环境信息 Version & Environment Information

CCACHE_DIR=/workspace/ccache_storage
ARCH_FLAGS="-march=sandybridge -mtune=broadwell"
CXX_FLAGS="$ARCH_FLAGS -Wno-error=range-loop-construct -Wno-error=maybe-uninitialized -Wno-error=switch -faligned-new=32"
CUDA_FLAGS="-t2 --forward-unknown-to-host-compiler -Xfatbin=-compress-all $ARCH_FLAGS -lineinfo"

SKIP_DOWNLOAD_INFERENCE_DATA=ON cmake -Bpaddle/build -Spaddle \
    -GNinja \
    -DINFERENCE_DEMO_INSTALL_DIR=/home/scratch.rjeng_sw/baidu/paddle/test_data \
    -DCMAKE_CXX_FLAGS="$CXX_FLAGS" \
    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_CUDA_FLAGS="$CUDA_FLAGS" \
    -DCUDA_ARCH_NAME=Manual \
    -DCUDA_ARCH_BIN="80" \
    -DWITH_INCREMENTAL_COVERAGE=OFF \
    -DWITH_INFERENCE_API_TEST=OFF \
    -DWITH_DISTRIBUTE=ON \
    -DWITH_COVERAGE=OFF \
    -DWITH_TENSORRT=OFF \
    -DWITH_TESTING=ON \
    -DWITH_CONTRIB=ON \
    -DWITH_ROCM=OFF \
    -DWITH_RCCL=OFF \
    -DWITH_STRIP=ON \
    -DWITH_MKL=OFF \
    -DWITH_AVX=OFF \
    -DWITH_GPU=ON \
    -DWITH_PYTHON=ON \
    -DWITH_CUDNN_FRONTEND=ON \
    -DPY_VERSION=$PYVER \
    -Wno-dev

cmake --build paddle/build -j$((`nproc`))
  • GCC 11.4.0

Metadata

Metadata

Assignees

Labels

NVIDIAstatus/close已关闭type/build编译/安装问题预测原名Inference,包含Capi预测问题等

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions