Created by: Avin0323
PR types
Others
PR changes
Others
Describe
Since the data download cmake-function did not support Windows system previously, unittests of inference APIs are disabled on Windows. This problem has been fixed in PR26512 which will set WITH_INFERENCE_API_TEST=ON
to add unittests of inference APIs on Windows.
And fix five unittest problems:
- In file
paddle/fluid/inference/tests/api/analyzer_image_classification_tester.cc
: To create directory should use_mkdir
instead ofmkdir
on windows. - In file
paddle/fluid/inference/tests/api/analyzer_ner_tester.cc
:std::min
should specify an explicit type, otherwise the compiler can't get correct type. - In file
paddle/fluid/inference/tests/api/CMakeLists.txt
:MobileNet_qat_perf.tar.gz
does not download before runtest_analyzer_quant_performance_benchmark
on Windows, but it download successful on Linux. The reason is that data only download on Linux according to filepython/paddle/fluid/contrib/slim/tests/CMakeLists.txt
. - In file
paddle/fluid/inference/tests/api/full_pascalvoc_test_preprocess.py
andpaddle/fluid/inference/tests/api/full_ILSVRC2012_val_preprocess.py
: The import location of theStringIO
is inconsistent between py2 and py3. 5.In filepaddle/fluid/inference/tests/api/analyzer_capi_tester.cc
: Float arrayinput
points to an invalid address, and it can run successful vianew/delete
. The real reason needs more debugging.