Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove mkldnn flag from gtest strdup for cpu #11395

Merged
merged 8 commits into from
Jun 15, 2018

Conversation

tensor-tang
Copy link
Contributor

fix #11393

@tensor-tang tensor-tang requested a review from luotao1 June 12, 2018 08:17
@tensor-tang
Copy link
Contributor Author

follow the comment #11319 (comment)

I can reproduce them:
python:

I0615 17:34:43.489296  5035 executor.cc:400] use_mkldnn=True
...
294: I0615 17:34:57.587157  5035 operator.cc:661] Transform Variable batch_norm_12.b_0 from data_type[float]:data_layout[NCHW]:place[CPUPlace]:library_type[PLAIN] to data_type[float]:data_layout[MKLDNNLAYOUT]:place[CPUPlace]:library_type[MKLDNN]
294: I0615 17:34:57.587194  5035 scope.cc:53] Create variable batch_norm_12.b_0
294: I0615 17:34:57.587294  5035 operator.cc:661] Transform Variable batch_norm_12.tmp_0 from data_type[float]:data_layout[NCHW]:place[CPUPlace]:library_type[PLAIN] to data_type[float]:data_layout[MKLDNNLAYOUT]:place[CPUPlace]:library_type[MKLDNN]

C++

 5645 test_inference_image_classification.cc:31] FLAGS_use_mkldnn: 1
53: I0615 17:38:00.281055  5645 test_inference_image_classification.cc:32] FLAGS_dirname: /home/tangjian/paddle-tj/build/python/paddle/fluid/tests/book/image_classification_resnet.inference.model

@@ -31,6 +31,7 @@ int main(int argc, char** argv) {
strdup("--tryfromenv=fraction_of_gpu_memory_to_use,use_pinned_memory"));
#else
new_argv.push_back(strdup("--tryfromenv=use_pinned_memory,use_mkldnn"));
new_argv.push_back(strdup("--undefok=use_mkldnn"));
Copy link
Contributor

Choose a reason for hiding this comment

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

请问--undefok是什么用法呢,有相关的资料链接么?

Copy link
Contributor Author

@tensor-tang tensor-tang Jun 15, 2018

Choose a reason for hiding this comment

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

这个可以参考这里
简单解释就是不认识的时候不要报错。但不是影响认识这个flag的时候。

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

@tensor-tang tensor-tang merged commit 609dccf into PaddlePaddle:develop Jun 15, 2018
@tensor-tang tensor-tang deleted the fix branch June 15, 2018 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test fail with cpu only
2 participants