PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
21.63k stars 5.44k forks source link

[cmake][test] fix `Unknown CMake command "inference_download_and_uncompress"` #63877

Closed gouzil closed 1 week ago

gouzil commented 1 week ago

PR Category

User Experience

PR Types

Bug fixes

Description

修复Unknown CMake command "inference_download_and_uncompress"

在其他单测中也会使用到inference_download_and_uncompress 函数,所以将其移动到 test 根目录的 CMakeLists 上

截屏2024-04-25 下午8 33 19

报错信息

WITH_DLNNE:
-- PYTHON_EXECUTABLE: /root/micromamba/envs/py312/bin/python
-- PT Disabled OpTest: set FLAGS_enable_pir_with_pt_in_dy2st to False for test_legacy_error
-- PT Disabled OpTest: set FLAGS_enable_pir_with_pt_in_dy2st to False for test_pylayer
-- PT Disabled OpTest: set FLAGS_enable_pir_with_pt_in_dy2st to False for test_local_cast
-- PIR Copied OpTest: test_fused_feedforward_pass_pir in legacy_test
CMake Error at test/quantization/CMakeLists.txt:198 (inference_download_and_uncompress):
  Unknown CMake command "inference_download_and_uncompress".
Call Stack (most recent call first):
  test/quantization/CMakeLists.txt:266 (download_quant_model)

-- Configuring incomplete, errors occurred!
See also "/home/gouzi/git/Paddle/build/CMakeFiles/CMakeOutput.log".
See also "/home/gouzi/git/Paddle/build/CMakeFiles/CMakeError.log".
Compiling
ninja: error: loading 'build.ninja': No such file or directory
error: Recipe `build_install` failed on line 3 with exit code 1
paddle-bot[bot] commented 1 week ago

你的PR提交成功,感谢你对开源项目的贡献! 请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。 Your PR has been submitted. Thanks for your contribution! Please wait for the result of CI firstly. See Paddle CI Manual for details.

SigureMo commented 1 week ago

是不是不用移到最顶层,移到 test/quantization/CMakeLists.txttest/deprecated/quantization/CMakeLists.txt 就好了?因为 test/cpp/inference/api 好像没用这个

不用在意 test/quantization/CMakeLists.txttest/deprecated/quantization/CMakeLists.txt 之间的重复,因为 test/deprecated/quantization 最终是会合并到 test/quantization

gouzil commented 1 week ago

是不是不用移到最顶层,移到 test/quantization/CMakeLists.txttest/deprecated/quantization/CMakeLists.txt 就好了?因为 test/cpp/inference/api 好像没用这个

https://github.com/PaddlePaddle/Paddle/blob/ed5bc2e8c219a5bbbb048b1985371d4d852bdaf5/test/cpp/inference/api/CMakeLists.txt#L27

可以搜inference_download_and_uncompress(会更准

gouzil commented 1 week ago

已经在 #63877 修复