Skip to content

Conversation

@Xreki
Copy link
Contributor

@Xreki Xreki commented Feb 7, 2018

Fix #8229

@Xreki Xreki added the 预测 原名Inference,包含Capi预测问题等 label Feb 7, 2018
DEPS ARCHIVE_START paddle_fluid ARCHIVE_END
ARGS --dirname=${PYTHON_TESTS_DIR}/book/${TARGET_NAME}.inference.model)
set_tests_properties(test_inference_${TARGET_NAME}
PROPERTIES DEPENDS test_${TARGET_NAME})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18-23行和10-15行非常类似,还可以再精简么?

Copy link
Contributor Author

@Xreki Xreki Feb 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

想象一下,如果避免重复,逻辑可以变成下面这样:

if(inference_test_ARGS) 每个arg前面加一个"__" else() 新增一个arg:"_" endif() foreach(arg ${inference_test_ARGS}) arg去掉最前面的"_" cc_test(...) set_tests_properties(...) endforeach() 
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以的,为了避免加其他单测时这里的冲突,简化可以放到下一个PR来完成。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Xreki Xreki merged commit b1869f1 into PaddlePaddle:develop Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

预测 原名Inference,包含Capi预测问题等

2 participants