Open vigsterkr opened 7 years ago
hi, I'm new to this and would like to take up this issue.
@piyushgoel997 sure, PRs are welcome!
Can you help me a bit in doing it since I'm also new to Open Source and Machine Learning? Like I found HAVE_PTHREAD at https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/classifier/svm/SVM.cpp#L22 then what do i need to do next?
@piyushgoel997 in that case nothing. in the other case you can see that pthread is being used to run parallel code. you should convert that using OpenMP. all these are well documented libraries, so please read about them and then try to convert the code and send a PR. it's not a problem if it's not working 100%, but without an attempt on the code it's really hard to help.
I made changes in Distance.cpp but I don't know if it's correct or not, so should I get it checked by you.
@piyushgoel997 create a PR and it's gonna get tested and i can review it as well
Made the pull request. Kindly review it. https://github.com/shogun-toolbox/shogun/pull/3607 Thanks.
I've started working on this issue to get familiar with shogun's codebase and I've made a PR, I'd like to receive some feedback if this is the right way to port code to OpenMP (removing helper methods and thread params structs).
Also I think I've found a problem in CHashedWDFeaturesTransposed: in the else branch of dense_dot_range_helper sub_index is null. https://github.com/shogun-toolbox/shogun/blob/8fdf278dca78f98d4e06058a5ce3defd560d697d/src/shogun/features/hashed/HashedWDFeaturesTransposed.cpp#L471
@micmn cool stuff. i've added there some comments. it very well be that there's a bug in the code fixes are more than appreciated.
There are several parts of the code that uses
pthread
for implementing parallel execution of the algorithms. These should be ported to use eitherOpenMP
or C++11std::thread
(preferably openmp).some examples UPDATED 2:
for finding the full list use:
git grep HAVE_PTHREAD