Skip to content

加速方法? #4

@ShuGao0810

Description

@ShuGao0810

博主好,训练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',似乎不起作用,博主这边有没有加速建议?可以从哪些方面加速?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions