Skip to content

Implement tbb-based parallelism; use repeatable random numbers. #186

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

Closed
wants to merge 0 commits into from

Conversation

Roebu
Copy link
Contributor

@Roebu Roebu commented Aug 25, 2022

This fork from the LibSVM 3.3 package incorporates the following enhancements:

Implements parallelism in the get_Q() and svc_predict_values() functions.
This requires that the tbb (thread building blocks) package be installed ("apt-get install -y libtbb-dev").
Initial performance tests on a 16-core machine indicate an elapsed time for a large training session to be reduced by a factor of 3 to 4.

Uses the std::minstd_rand random number generator instead of the usual rand() and srand(). This allows for repeatable random numbers to be generated which is importand when implementing unit tests.

@cjlin1
Copy link
Owner

cjlin1 commented Aug 26, 2022 via email

@Roebu
Copy link
Contributor Author

Roebu commented Aug 26, 2022

Thank you for the prompt reply.
Regarding the tbb changes, I perfectly understand why you want to keep the code portable across platforms. Perhaps some kind of '#ifdef' based solution would be appropriate here (?).

@cjlin1
Copy link
Owner

cjlin1 commented Aug 27, 2022 via email

@Roebu
Copy link
Contributor Author

Roebu commented Aug 28, 2022

No major comments from my side. I would only say that we have had very good experience using the tbb library for implementing parallelism in our code. The tbb library automatically makes use of all the cores available.

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.

2 participants