-
Couldn't load subscription status.
- Fork 5.9k
Closed
Labels
预测原名Inference,包含Capi预测问题等原名Inference,包含Capi预测问题等
Description
When we add an inference unittest, we need to add a cc_test and set_tests_properties to ensure the C++ unittest running after the corresponding Python unittest.
Paddle/paddle/inference/tests/book/CMakeLists.txt
Lines 2 to 25 in b41205d
| cc_test(test_inference_recognize_digits_mlp | |
| SRCS test_inference_recognize_digits.cc | |
| DEPS ARCHIVE_START paddle_fluid ARCHIVE_END | |
| ARGS --dirname=${PYTHON_TESTS_DIR}/book/recognize_digits_mlp.inference.model) | |
| cc_test(test_inference_image_classification_vgg | |
| SRCS test_inference_image_classification.cc | |
| DEPS ARCHIVE_START paddle_fluid ARCHIVE_END | |
| ARGS --dirname=${PYTHON_TESTS_DIR}/book/image_classification_vgg.inference.model) | |
| cc_test(test_inference_image_classification_resnet | |
| SRCS test_inference_image_classification.cc | |
| DEPS ARCHIVE_START paddle_fluid ARCHIVE_END | |
| ARGS --dirname=${PYTHON_TESTS_DIR}/book/image_classification_resnet.inference.model) | |
| cc_test(test_inference_label_semantic_roles | |
| SRCS test_inference_label_semantic_roles.cc | |
| DEPS ARCHIVE_START paddle_fluid ARCHIVE_END | |
| ARGS --dirname=${PYTHON_TESTS_DIR}/book/label_semantic_roles.inference.model) | |
| set_tests_properties(test_inference_recognize_digits_mlp | |
| PROPERTIES DEPENDS test_recognize_digits) | |
| set_tests_properties(test_inference_image_classification_vgg | |
| PROPERTIES DEPENDS test_image_classification_train) | |
| set_tests_properties(test_inference_image_classification_resnet | |
| PROPERTIES DEPENDS test_image_classification_train) | |
| set_tests_properties(test_inference_label_semantic_roles | |
| PROPERTIES DEPENDS test_label_semantic_roles) |
It is the same for all unittests, so that we can write a common function to simplify the CMakeLists.txt.
Metadata
Metadata
Assignees
Labels
预测原名Inference,包含Capi预测问题等原名Inference,包含Capi预测问题等