add dfg graphviz pass#11211
Merged
Superjomn merged 2 commits intoPaddlePaddle:developfrom Jun 6, 2018
Merged
Conversation
luotao1
reviewed
Jun 6, 2018
| SRCS dfg_graphviz_draw_pass_tester.cc | ||
| DEPS analysis | ||
| ARGS --inference_model_dir=${PYTHON_TESTS_DIR}/book/word2vec.inference.model) | ||
| set_tests_properties(test_dfg_graphviz_draw_pass PROPERTIES DEPENDS test_word2vec) |
Contributor
There was a problem hiding this comment.
请问analysis目录下的单侧为什么要依赖test_word2vec的模型目录呢?
Contributor
Author
There was a problem hiding this comment.
test_word2vec 生成model
Contributor
There was a problem hiding this comment.
- 需要word2vec model的programdesc来进行分析,加下注释。
- 需要加一个function,减少CMake这里的代码。
| std::string Draw(DataFlowGraph* graph) { return graph->DotString(); } | ||
|
|
||
| std::string dir_; | ||
| std::string id_; |
| bool Finalize() override { return Pass::Finalize(); } | ||
|
|
||
| Pass* CreatePrinterPass(std::ostream& os, | ||
| const std::string& banner) const override { |
Contributor
There was a problem hiding this comment.
请问这个函数的功能是什么呢,参数banner是指?我看单侧里也没有用到这个函数。
Contributor
Author
There was a problem hiding this comment.
| pass.Run(&dfg); | ||
|
|
||
| // test content | ||
| std::ifstream file("./graph_test.dot"); |
| while (std::getline(file, line)) { | ||
| no++; | ||
| } | ||
| ASSERT_EQ(no, 82); |
Contributor
There was a problem hiding this comment.
请加注释说明下82行的来源,不过如果programdesc发生变化了,这里会不会就过不了了。
luotao1
approved these changes
Jun 6, 2018
| SRCS dfg_graphviz_draw_pass_tester.cc | ||
| DEPS analysis | ||
| ARGS --inference_model_dir=${PYTHON_TESTS_DIR}/book/word2vec.inference.model) | ||
| set_tests_properties(test_dfg_graphviz_draw_pass PROPERTIES DEPENDS test_word2vec) |
Contributor
There was a problem hiding this comment.
- 需要word2vec model的programdesc来进行分析,加下注释。
- 需要加一个function,减少CMake这里的代码。
| pass.Run(&dfg); | ||
|
|
||
| // test content | ||
| std::ifstream file("./graph_test.dot"); |
| while (std::getline(file, line)) { | ||
| no++; | ||
| } | ||
| ASSERT_EQ(no, 82); |
Contributor
There was a problem hiding this comment.
请加注释说明下82行的来源,不过如果programdesc发生变化了,这里会不会就过不了了。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.