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

modify im2col.cpp into a multi-thread version #397

Closed
wants to merge 1 commit into from

Conversation

luotao1
Copy link

@luotao1 luotao1 commented May 7, 2014

When training ImageNet model on CPU, ConvolutionLayer<Dtype>::Forward_cpu and ConvolutionLayer<Dtype>::Backward_cpu occupy about 80% time, and im2col_cpu + col2im_cpu occupy 30%~50% time of ConvolutionLayer, thus, we modify im2col.cpp into a multi-thread version.

We test out modified version on our 4-physical-core machine, if we create 4 pthreads, we can decrease 50% time of im2col_cpu + col2im_cpu . And you can define your THREAD_NUM based on the physical core number of your machine.

@sguada
Copy link
Contributor

sguada commented May 7, 2014

Nice idea, in general is better to PR against dev branch

@luotao1
Copy link
Author

luotao1 commented May 8, 2014

Yes, I will PR to dev branch~

@luotao1 luotao1 closed this May 8, 2014
@luotao1 luotao1 reopened this May 8, 2014
@luotao1 luotao1 closed this May 8, 2014
@luotao1 luotao1 deleted the pthread_im2col branch May 8, 2014 08:49
beniz pushed a commit to jolibrain/caffe that referenced this pull request Jan 25, 2017
added compute capabilities for latest GPUs
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.

None yet

2 participants