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

VEGAS slow? #77

Closed
tsfloss opened this issue Jun 12, 2021 · 2 comments
Closed

VEGAS slow? #77

tsfloss opened this issue Jun 12, 2021 · 2 comments

Comments

@tsfloss
Copy link

tsfloss commented Jun 12, 2021

Hi!

First of all, thanks for starting this project!

I was tinkering about with the VEGAS integrator and noticed that its speed (both on CPU (pytorch automatically uses multiple cores, right?) and GPU) is nowhere near as fast as the standard python package for vegas (with vectorized integrands) on just a single core. Results do match.

Have you tested torchquad vs standard vegas and ran into the same?

Curious to hear what you think about this :)

@gomezzz
Copy link
Collaborator

gomezzz commented Jun 12, 2021

Hey!

Thanks for the feedback! :)

It's nice to see people using and comparing it!

You are right that our implementation is comparatively a bit slow at the moment. Vectorization proved non-trivial in some cases, especially over the dimension. We will need to look into it more.

There are also some parameters, which require more tuning like # of vegas iterations and # of stratifications.

Can you provide some details on the settings you used? Then I will include them in the profiling that we will be doing to identify the bottlenecks. Of particular interest would be N, integrand and dimensionality.

One part that we were particularly struggling with is the weight accumulation in the vegas map here:

def accumulate_weight(self, y, jf_vec2):

If you have any thoughts on vectorizing that function we will gladly try them!

@gomezzz gomezzz mentioned this issue Aug 6, 2021
3 tasks
@gomezzz
Copy link
Collaborator

gomezzz commented Apr 12, 2022

Fixed in #137 , will be in the next release

@gomezzz gomezzz closed this as completed Apr 12, 2022
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