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

Speeding Up the Calculation #48

Closed
uqhwen2 opened this issue Oct 24, 2023 · 2 comments
Closed

Speeding Up the Calculation #48

uqhwen2 opened this issue Oct 24, 2023 · 2 comments

Comments

@uqhwen2
Copy link

uqhwen2 commented Oct 24, 2023

I'm wondering how can we do to leverage multiple CPUs when doing the annealing algorithm? I try to use GPU for quicker calculation, but it seems does not offer any help :(.

I notice that when I run this code, it only takes up 1 CPU, but my other learning algorithm like simple neural network can take up multiple CPUs to accelerate the calculation.

Thanks for any reply.

Cheers.

@perrygeo
Copy link
Owner

The simulated annealing algorithm is inherently serial - each iteration strictly depends on the result of the previous. You can check the literature for "parallel simulated annealing" - there are plenty of good ideas. But this library is focused on experimentation with the classic simulated annealing algorithm. If performance is your goal, you're better off writing it in another language entirely.

Another alternative is to e.g. create an ensemble of runs that can be executed in parallel.

@uqhwen2
Copy link
Author

uqhwen2 commented Oct 25, 2023

Thanks mate, I really appreciate your helpful comments!

Best regard,
HW

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