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

加速方法? #4

Open
ShuGao0810 opened this issue Oct 8, 2018 · 1 comment
Open

加速方法? #4

ShuGao0810 opened this issue Oct 8, 2018 · 1 comment

Comments

@ShuGao0810
Copy link

ShuGao0810 commented Oct 8, 2018

博主好,训练7G+的语料时,当前代码运行效率非常低。我试了下用GPU加速训练,在cw2vec_kernals.cc的
REGISTER_KERNEL_BUILDER(Name("NegTrainCw2vec").Device(DEVICE_CPU), NegTrainCw2vecOp);后加上了

#if GOOGLE_CUDA
REGISTER_KERNEL_BUILDER(Name("NegTrainCw2vec").Device(DEVICE_GPU), NegTrainCw2vecOp);
#endif

同时在shell脚本中指定CUDA_VISIBLE_DEVICES='0',似乎不起作用,博主这边有没有加速建议?可以从哪些方面加速?

@qwfy
Copy link
Contributor

qwfy commented Oct 8, 2018

几点小想法:

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

No branches or pull requests

2 participants